updated webpack again
const path = require("path");
-const CopyPlugin = require("copy-webpack-plugin");
+const CopyWebPlugin = require('copy-webpack-plugin');
const WasmPackPlugin = require("@wasm-tool/wasm-pack-plugin");
-const NodePolyfillPlugin = require("node-polyfill-webpack-plugin")
const dist = path.resolve(__dirname, "dist");
@@ -14,31 +13,18 @@ module.exports = {
path: dist,
filename: "[name].js"
},
- resolve: {
- fallback: {
- "path": require.resolve("path-browserify")
- }
- },
devServer: {
contentBase: dist,
},
- experiments: {
- outputModule: false,
- syncWebAssembly: true,
- topLevelAwait: false,
- asyncWebAssembly: false,
- },
plugins: [
- new CopyPlugin({
+ new CopyWebPlugin({
patterns: [
- path.resolve(__dirname, "static")
+ {
+ from: path.resolve(__dirname, "static")
+ }
]
}),
- new NodePolyfillPlugin({
- excludeAliases: ["console"]
- }),
-
new WasmPackPlugin({
crateDirectory: __dirname,
}),
