overwrite buffer
This commit is contained in:
parent
a9d80bef8f
commit
da180fcc92
@ -1,4 +1,5 @@
|
||||
const path = require("path");
|
||||
const webpack = require("webpack");
|
||||
const TerserPlugin = require("terser-webpack-plugin");
|
||||
|
||||
module.exports = {
|
||||
@ -9,6 +10,16 @@ module.exports = {
|
||||
path: __dirname,
|
||||
libraryTarget: "commonjs",
|
||||
},
|
||||
plugins: [
|
||||
// Work around for Buffer is undefined:
|
||||
// https://github.com/webpack/changelog-v5/issues/10
|
||||
new webpack.ProvidePlugin({
|
||||
Buffer: ["buffer", "Buffer"],
|
||||
}),
|
||||
new webpack.ProvidePlugin({
|
||||
process: "process/browser",
|
||||
}),
|
||||
],
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user