There's nothing preventing that single blob from being exported to webpack. I currently export stuff into a legacy require.js/angular app using globals, so I imagine the same could be accomplished with webpack.
The issue will arise when you attempt to include multiple "scala.js webpack" modules. Each one will be compiled as an independent unit and carry it's own subset of the scala standard libraries, etc. For a transitional scenario, that's probably fine, but it does make participation in a fully polyglot webpack-loader or npm ecosystem problematic.
Scala.js also performs whole-program optimizations of the code, besides "simple" dead cole elimination.
But, as other comments note, this is a non-trivial problem.
Very promising enhancement. Thanks !
import 'MyModule' from 'MyModule.scala.js'
easily from Webpack, etc.