diff --git a/Cargo.toml b/Cargo.toml index 6482347..b4a5a65 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,8 @@ +[profile.release] +codegen-units = 1 +lto = "fat" +opt-level = "z" + [workspace] members = [ "crates/browser", diff --git a/Makefile.toml b/Makefile.toml index 9af9768..2e0be78 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -10,8 +10,8 @@ npm install [tasks.build-server] script = ''' -cargo build -wasm-bindgen --keep-debug --out-dir ./packages/app/assets/wasm --target web --typescript ./target/wasm32-unknown-unknown/debug/demo_lsp_browser.wasm +cargo build --release +wasm-bindgen --out-dir ./packages/app/assets/wasm --target web --typescript ./target/wasm32-unknown-unknown/release/demo_lsp_browser.wasm ''' [tasks.build-app] diff --git a/packages/app/webpack.config.js b/packages/app/webpack.config.js index c462065..7d9c5dd 100644 --- a/packages/app/webpack.config.js +++ b/packages/app/webpack.config.js @@ -12,7 +12,7 @@ const config = { experiments: { asyncWebAssembly: true, }, - mode: "development", + mode: "production", target: "web", entry: { app: "./src/index.ts",