fix(api, client): update Gatsby, webpack & related things (#41452)

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
Mrugesh Mohapatra
2021-03-26 00:43:43 +05:30
committed by GitHub
parent 92dfb3065c
commit ad9b1f89d8
71 changed files with 35182 additions and 9001 deletions

View File

@ -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')
}
}
};
};