diff --git a/README.md b/README.md index d658bb1..45b5324 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,28 @@ Rust-generated WebAssembly and using them to create a Website. npm init wasm-app ``` +**Note** +You may face error like below: +```shell +(node:257464) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated. +(Use `node --trace-deprecation ...` to show where the warning was created) +ℹ 「wds」: Project is running at http://localhost:8080/ +ℹ 「wds」: webpack output is served from / +node:internal/crypto/hash:69 + this[kHandle] = new _Hash(algorithm, xofLen); + ... +``` +That error because of `devDependencies` versions conflicted with you Node version. + +You can simply update `devDependencies` versions by below commands: +```shell +npm i -g npm-check-updates +ncu -u +npm install +``` +Reference: https://stackoverflow.com/a/16074029/8093348 + + ## 🔋 Batteries Included - `.gitignore`: ignores `node_modules` diff --git a/package.json b/package.json index d21d358..93f6602 100644 --- a/package.json +++ b/package.json @@ -27,10 +27,10 @@ }, "homepage": "https://github.com/rustwasm/create-wasm-app#readme", "devDependencies": { + "copy-webpack-plugin": "^11.0.0", "hello-wasm-pack": "^0.1.0", - "webpack": "^4.29.3", - "webpack-cli": "^3.1.0", - "webpack-dev-server": "^3.1.5", - "copy-webpack-plugin": "^5.0.0" + "webpack": "^5.88.2", + "webpack-cli": "^5.1.4", + "webpack-dev-server": "^4.15.1" } -} +} \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index 80ad814..31f0275 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -9,6 +9,13 @@ module.exports = { }, mode: "development", plugins: [ - new CopyWebpackPlugin(['index.html']) + new CopyWebpackPlugin({ + patterns: [ + { from: 'index.html' } + ] + }) ], + experiments: { + asyncWebAssembly: true, + } };