Skip to content

Conversation

@alexcrichton
Copy link
Contributor

This commit reverts part of the implementation of RFC 6. That RFC
specified that the --browser flag was going to be repurposed for the
new "natively loadable as ES module output", but unfortunately the
breakage is far broader than initially expected. It turns out that
wasm-pack passes --browser by default which means that a change to
break --browser would break all historical versions of wasm-pack
which is a bit much for now.

To solve this the --browser flag is going back to what it represents
on the current released version of wasm-bindgen (optimize away some
node.js checks in a few places for bundler-style output) and a new
--web flag is being introduced as the new deployment strategy.

Closes #1318

This commit reverts part of the implementation of [RFC 6]. That RFC
specified that the `--browser` flag was going to be repurposed for the
new "natively loadable as ES module output", but unfortunately the
breakage is far broader than initially expected. It turns out that
`wasm-pack` passes `--browser` by default which means that a change to
break `--browser` would break all historical versions of `wasm-pack`
which is a bit much for now.

To solve this the `--browser` flag is going back to what it represents
on the current released version of `wasm-bindgen` (optimize away some
node.js checks in a few places for bundler-style output) and a new
`--web` flag is being introduced as the new deployment strategy.

[RFC 6]: rustwasm/rfcs#6

Closes wasm-bindgen#1318
@alexcrichton alexcrichton merged commit a7e7f8b into wasm-bindgen:master Mar 7, 2019
@alexcrichton alexcrichton deleted the switch-to-web branch March 7, 2019 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants