📅  最后修改于: 2022-03-11 14:47:42.202000             🧑  作者: Mango
//In webpack.config.js add (or add to) plugins and resolve
const webpack = require('webpack');
module.exports = {
plugins: [
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
}),
new webpack.ProvidePlugin({
process: 'process/browser',
}),
],
resolve: {
extensions: [ '.ts', '.js' ],
fallback: {
"stream": require.resolve("stream-browserify"),
"buffer": require.resolve("buffer")
}
},