Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions pg-wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,13 @@ web-sys = { version = "0.3", features = ["console", "Window", "Performance"] }

[package.metadata.wasm-pack.profile.release]
wasm-opt = ["-Os"]

# Pass wasm-bindgen's --omit-default-module-path so the generated `--target web`
# glue does not emit the unreachable `new URL('index_bg.wasm', import.meta.url)`
# default-module-path branch. Webpack 5 statically resolves that `new URL(...,
# import.meta.url)` as an asset import at build time even though the branch never
# fires for callers that always pass `module_or_path` (e.g. @e4a/pg-js), so
# downstream consumers otherwise hit `Module not found: Can't resolve
# 'index_bg.wasm'`. See #153.
[package.metadata.wasm-pack.profile.release.wasm-bindgen]
omit-default-module-path = true
Loading