diff --git a/template/package.json b/template/package.json index 26c4708..5bd2efb 100644 --- a/template/package.json +++ b/template/package.json @@ -4,15 +4,15 @@ "version": "0.1.0", "scripts": { "build": "rimraf dist pkg && webpack", - "start": "rimraf dist pkg && webpack-dev-server --open -d", + "start": "rimraf dist pkg && webpack-dev-server --open", "test": "cargo test && wasm-pack test --headless" }, "devDependencies": { "@wasm-tool/wasm-pack-plugin": "^1.1.0", - "copy-webpack-plugin": "^5.0.3", - "webpack": "^4.42.0", - "webpack-cli": "^3.3.3", - "webpack-dev-server": "^3.7.1", + "copy-webpack-plugin": "^10.2.0", + "webpack": "^5.1.0", + "webpack-cli": "^4.9.1", + "webpack-dev-server": "^4.7.2", "rimraf": "^3.0.0" } -} +} \ No newline at end of file diff --git a/template/webpack.config.js b/template/webpack.config.js index d35da09..1e12c00 100644 --- a/template/webpack.config.js +++ b/template/webpack.config.js @@ -14,12 +14,19 @@ module.exports = { filename: "[name].js" }, devServer: { - contentBase: dist, + static: { + directory: dist + }, + }, + experiments: { + asyncWebAssembly: true }, plugins: [ - new CopyPlugin([ - path.resolve(__dirname, "static") - ]), + new CopyPlugin({ + patterns: [ + path.resolve(__dirname, "static") + ] + }), new WasmPackPlugin({ crateDirectory: __dirname,