Enable release/production mode

This commit is contained in:
silvanshade 2022-06-15 16:02:04 -06:00
parent db38b5ed74
commit 40cf89bd9f
No known key found for this signature in database
3 changed files with 8 additions and 3 deletions

View file

@ -1,3 +1,8 @@
[profile.release]
codegen-units = 1
lto = "fat"
opt-level = "z"
[workspace] [workspace]
members = [ members = [
"crates/browser", "crates/browser",

View file

@ -10,8 +10,8 @@ npm install
[tasks.build-server] [tasks.build-server]
script = ''' script = '''
cargo build cargo build --release
wasm-bindgen --keep-debug --out-dir ./packages/app/assets/wasm --target web --typescript ./target/wasm32-unknown-unknown/debug/demo_lsp_browser.wasm wasm-bindgen --out-dir ./packages/app/assets/wasm --target web --typescript ./target/wasm32-unknown-unknown/release/demo_lsp_browser.wasm
''' '''
[tasks.build-app] [tasks.build-app]

View file

@ -12,7 +12,7 @@ const config = {
experiments: { experiments: {
asyncWebAssembly: true, asyncWebAssembly: true,
}, },
mode: "development", mode: "production",
target: "web", target: "web",
entry: { entry: {
app: "./src/index.ts", app: "./src/index.ts",