image-effects/webpack.config.js
2021-10-28 13:25:32 -04:00

22 lines
486 B
JavaScript

const path = require("path")
const HTMLWebpackPlugin = require("html-webpack-plugin")
const WasmPackPlugin = require("@wasm-tool/wasm-pack-plugin")
module.exports = {
entry: "./public/main.js",
output: {
path: path.resolve(__dirname, "dist"),
filename: "index.js",
},
plugins: [
new HTMLWebpackPlugin({
template: "./public/index.html",
}),
new WasmPackPlugin({
crateDirectory: path.resolve(__dirname, "."),
}),
],
experiments: {
asyncWebAssembly: true,
},
}