Add buffer webpack plugin

This commit is contained in:
willclarktech
2021-05-20 12:03:38 +02:00
parent 205a6769bc
commit f5266e78c0
11 changed files with 64 additions and 1 deletions
+1
View File
@@ -48,6 +48,7 @@
"@types/node": "^15.0.1",
"@typescript-eslint/eslint-plugin": "^4.22.1",
"@typescript-eslint/parser": "^4.22.1",
"buffer": "^6.0.3",
"eslint": "^7.5",
"eslint-config-prettier": "^8.3.0",
"eslint-import-resolver-node": "^0.3.4",
+6
View File
@@ -1,6 +1,7 @@
/* eslint-disable @typescript-eslint/naming-convention */
const glob = require("glob");
const path = require("path");
const webpack = require("webpack");
const target = "web";
const distdir = path.join(__dirname, "dist", "web");
@@ -14,5 +15,10 @@ module.exports = [
path: distdir,
filename: "tests.js",
},
plugins: [
new webpack.ProvidePlugin({
Buffer: ["buffer", "Buffer"],
}),
],
},
];