rust-dominator/examples/animation/webpack.config.js

36 lines
655 B
JavaScript

const path = require("path");
const CopyPlugin = require("copy-webpack-plugin");
const WasmPackPlugin = require("@wasm-tool/wasm-pack-plugin");
const dist = path.resolve(__dirname, "dist");
module.exports = {
mode: "production",
stats: "errors-warnings",
entry: {
index: "./js/index.js"
},
output: {
path: dist,
filename: "[name].js"
},
devServer: {
liveReload: true,
open: true,
noInfo: true,
overlay: {
warnings: true,
errors: true
}
},
plugins: [
new CopyPlugin([
path.resolve(__dirname, "static")
]),
new WasmPackPlugin({
crateDirectory: __dirname
})
]
};