paprika/webpack.config.js
Peter Cai c91d152d65
project restruct: use webpack instead of wrangler's wasm-pack support
The generated script from wrangler keeps re-instantiating the WASM
module every time the request is processed. Instead, let's switch to
using the much, much better Webpack support for WASM.
2020-04-09 12:40:15 +08:00

12 lines
236 B
JavaScript

const WasmPackPlugin = require("@wasm-tool/wasm-pack-plugin");
module.exports = {
target: "webworker",
entry: "./worker.js",
mode: "production",
plugins: [
new WasmPackPlugin({
crateDirectory: __dirname,
})
]
};