Skip to content

Commit

Permalink
Bring back buffer webpack fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
martincik committed Oct 21, 2022
1 parent c78296f commit 7ab5c3b
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const path = require("path");
const webpack = require("webpack");
var CopyPlugin = require("copy-webpack-plugin");
const StatoscopeWebpackPlugin = require("@statoscope/webpack-plugin").default;
const { DuplicatesPlugin } = require("inspectpack/plugin");
Expand All @@ -21,6 +22,10 @@ module.exports = (env, argv) => {
},
plugins: isDevBuild
? [
new webpack.ProvidePlugin({
process: "process/browser",
Buffer: ["buffer", "Buffer"],
}),
new StatoscopeWebpackPlugin(),
new CopyPlugin([{ from: "dev/" }]),
new DuplicatesPlugin({
Expand All @@ -40,7 +45,13 @@ module.exports = (env, argv) => {
verbose: true,
}),
]
: [new StatoscopeWebpackPlugin()],
: [
new webpack.ProvidePlugin({
process: "process/browser",
Buffer: ["buffer", "Buffer"],
}),
new StatoscopeWebpackPlugin(),
],
optimization: {
minimize: !isDevBuild,
},
Expand Down

0 comments on commit 7ab5c3b

Please sign in to comment.