mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 07:38:07 -05:00
fix: correct Buffer polyfill in webpack config
This commit is contained in:
parent
015f55b462
commit
4153ad6538
1 changed files with 4 additions and 1 deletions
|
@ -108,7 +108,7 @@ module.exports = {
|
||||||
resolve: {
|
resolve: {
|
||||||
fallback: {
|
fallback: {
|
||||||
// Node modules are no longer polyfilled by default in Webpack 5, so we need to add these here
|
// Node modules are no longer polyfilled by default in Webpack 5, so we need to add these here
|
||||||
buffer: require.resolve('buffer/'),
|
Buffer: require.resolve('buffer/'),
|
||||||
stream: require.resolve('stream-browserify') // jszip
|
stream: require.resolve('stream-browserify') // jszip
|
||||||
},
|
},
|
||||||
symlinks: false // Fix local development with `npm link` packages
|
symlinks: false // Fix local development with `npm link` packages
|
||||||
|
@ -200,6 +200,9 @@ module.exports = {
|
||||||
new EmitFilePlugin({
|
new EmitFilePlugin({
|
||||||
filename: 'version.txt',
|
filename: 'version.txt',
|
||||||
content: getVersionId
|
content: getVersionId
|
||||||
|
}),
|
||||||
|
new webpack.ProvidePlugin({
|
||||||
|
Buffer: ['buffer', 'Buffer']
|
||||||
})
|
})
|
||||||
].concat(pageRoutes
|
].concat(pageRoutes
|
||||||
.map(route => new HtmlWebpackPlugin(defaults({}, {
|
.map(route => new HtmlWebpackPlugin(defaults({}, {
|
||||||
|
|
Loading…
Reference in a new issue