You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a result, I found it very confusing when profiling the (slow vs js) performance of a fairly simple wasm module that I had built and was running from this template.
Steps to Reproduce
npm init rust-webpack my-app
cd my-app
npm run start
Crate is compiled in dev profile, but there is no indication in the README, webpack.config.js, or the terminal that this is so.
Expected Behavior
I was expecting that the crate would be compiled in "release" profile, since the wasm-pack documentation says that that is its default.
Actual Behavior
The crate is is compiled in "dev" profile.
The text was updated successfully, but these errors were encountered:
I made a PR (#117) to add some info to the webpack config that would have helped me.
If it would be useful, I'd be happy to make a follow-up PR to modify the README to point this out, or take a stab at modifying the command-line output to add "in X profile" to the Compiling your crate... message.
Describe the Bug
npm run start
uses theWasmPackPlugin
to compile the associated crate, and that plugin compiles in "dev" profile by default.This wasn't obvious (to me), and it seems that it contravenes other documentation in the wasm-pack book that indicates that
wasm-pack build
defaults to "release" profile.As a result, I found it very confusing when profiling the (slow vs js) performance of a fairly simple wasm module that I had built and was running from this template.
Steps to Reproduce
npm init rust-webpack my-app
cd my-app
npm run start
Expected Behavior
I was expecting that the crate would be compiled in "release" profile, since the wasm-pack documentation says that that is its default.
Actual Behavior
The crate is is compiled in "dev" profile.
The text was updated successfully, but these errors were encountered: