overwrite buffer
This commit is contained in:
parent
a9d80bef8f
commit
da180fcc92
@ -1,4 +1,5 @@
|
|||||||
const path = require("path");
|
const path = require("path");
|
||||||
|
const webpack = require("webpack");
|
||||||
const TerserPlugin = require("terser-webpack-plugin");
|
const TerserPlugin = require("terser-webpack-plugin");
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
@ -9,6 +10,16 @@ module.exports = {
|
|||||||
path: __dirname,
|
path: __dirname,
|
||||||
libraryTarget: "commonjs",
|
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: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user