4 ms·
npm support is now available through https://scalacenter.github.io/scalajs-bundler/ https://scalacenter.github.io/scalajs-bundler/ I agree with your analysis o
by sjrd 10y ago
npm support is now available through https://scalacenter.github.io/scalajs-bundler/ https://scalacenter.github.io/scalajs-bundler/
I agree with your analysis on breakpoints and step-by-step in Scala.js. Usually it's a good idea to disable the Scala.js optimizer if you're doing that, using:
scalaJSOptimizerOptions ~= { _.withDisableOptimizer(true) }
But it's still not 100% perfect. I am toying with the idea that we should have a mode of the optimizer that tries to optimize for debuggability with step-by-step and breakpoints. This would try to arrange the generated source in closer relation with the source code (like, 1 line = 1 line). All of this is trying to work around limitations of source maps, and also of browsers' support for source maps. It would be so much easier if source maps were a little bit more powerful in what they can express (e.g., indicating what a "step" should be in the code).
- jxm262 10y agoThis bundler looks awesome sjrd, will give it a try soon. My other option I was going to suggest to other is to take a look at the sbt-web project. But keeping things compatible and seamless with npm I think is important since it's ubiquitous with front end devs