by ravicious · 10y ago · 0 comments
We do the same in our project: we bundle all the 3rd party libs when they change, so only our own code gets retranspiled on each page load. During deployment, we bundle all the JS in a single bundle (which is good for us, as we don't have too much JS in that project).
> jspm bundle app//* - [app//*] js/tmp/dependency-bundle.js --inject --no-runtime
That tells JSPM to bundle everything except your application if your app lives within the app/ directory.
> jspm bundle babel js/tmp/bundles/babel.js --inject --skip-source-maps --minify
This tells it to bundle the Babel dependencies which aren't considered in the above.
jspm bundle src/app.js - src/[/*]
This will tell jspm to bundle src/app.js with all its dependencies, excluding everything in the src/ directory. This will result in JSPM bundling only your dependencies.