Compare commits

...

2 commits

Author SHA1 Message Date
67822f9f31 Update npm dependencies
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing
2022-11-28 17:19:16 -05:00
a7d7d219a8 Optimize release builds for filesize 2022-11-28 17:18:52 -05:00
4 changed files with 2605 additions and 4215 deletions

View file

@ -28,3 +28,8 @@ getrandom = { version = "0.2.4", features = ["js"] }
[target.'cfg(windows)'.build-dependencies]
winres = "0.1.12"
[profile.release]
lto = true
opt-level = 's'

6757
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -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",
"rimraf": "^3.0.0"
"copy-webpack-plugin": "^11.0.0",
"rimraf": "^3.0.0",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.0",
"webpack-dev-server": "^4.11.1"
}
}

View file

@ -5,24 +5,32 @@ const WasmPackPlugin = require("@wasm-tool/wasm-pack-plugin");
const dist = path.resolve(__dirname, "dist");
module.exports = {
mode: "production",
entry: {
index: "./js/index.js"
},
output: {
path: dist,
filename: "[name].js"
},
devServer: {
contentBase: dist,
},
plugins: [
new CopyPlugin([
path.resolve(__dirname, "static")
]),
mode: "production",
entry: {
index: "./js/index.js"
},
output: {
path: dist,
filename: "[name].js"
},
experiments: {
asyncWebAssembly: true,
syncWebAssembly: true
},
devServer: {
static: {
directory: dist,
}
},
plugins: [
new CopyPlugin({
patterns: [
"static"
]
}),
new WasmPackPlugin({
crateDirectory: __dirname,
}),
]
new WasmPackPlugin({
crateDirectory: __dirname,
}),
]
};