Pauan / rust-dominator

Zero-cost ultra-high-performance declarative DOM library using FRP signals for Rust!
MIT License
960 stars 62 forks source link

examples, debug mode based on watch? #37

Closed dakom closed 4 years ago

dakom commented 4 years ago

looking at e.g. https://github.com/Pauan/rust-dominator/blob/62ef25ea81395985c3b3fe0dc5c6dcdd07f30903/examples/counter/rollup.config.js#L19

Seems the debug mode is hardcoded to false ... should it not be true when watch is true? (for local dev)

Pauan commented 4 years ago

There isn't that much compile time difference between debug mode and release mode (they're both very slow). If it compiles for debug mode, then when you release it has to do a full recompilation. But if it always compiles in release mode, then it doesn't need to recompile.

You can see this yourself: delete target, remove the debug: false, then use yarn start. Afterwards, use yarn build. It will do a full compile twice.

But if you leave the debug: false in, then use yarn start, then use yarn build, it will only compile once.