fix(api, client): update Gatsby, webpack & related things (#41452)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
committed by
GitHub
parent
92dfb3065c
commit
ad9b1f89d8
@ -1,4 +1,5 @@
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
const { writeFileSync } = require('fs');
|
||||
|
||||
@ -60,7 +61,21 @@ module.exports = (env = {}) => {
|
||||
plugins: [
|
||||
new CopyWebpackPlugin([
|
||||
{ from: 'node_modules/sass.js/dist/sass.sync.js' }
|
||||
])
|
||||
]
|
||||
]),
|
||||
new webpack.ProvidePlugin({
|
||||
process: 'process/browser'
|
||||
}),
|
||||
new webpack.ProvidePlugin({
|
||||
Buffer: ['buffer', 'Buffer']
|
||||
})
|
||||
],
|
||||
resolve: {
|
||||
fallback: {
|
||||
buffer: require.resolve('buffer'),
|
||||
util: false,
|
||||
stream: false,
|
||||
process: require.resolve('process/browser')
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user