jspm / registry

The jspm registry and package.json override service
https://jspm.io
229 stars 256 forks source link

Transpiling NPM packages directly into the JSPM packages folder? #967

Open oleersoy opened 7 years ago

oleersoy commented 7 years ago

Just wondering whether it is currently possible?

http://stackoverflow.com/questions/39274404/transpiling-npm-packages-directly-into-the-jspm-packages-folder

pcwinters commented 7 years ago

@guybedford, I've spent a couple of days trying to figure out a workflow to make this happen as well. Ultimately, I think support is rather light on what view is the most exciting use-case: async module loading w/ HTTP/2 that does not perform in-browser transpilation

guybedford commented 7 years ago

This is the principle that https://npm.jspm.io and https://github.jspm.io were both built to, but that idea isn't ready for prime time until browsers can optimize the request / execution cycle adequately. Bundling thus remains the focus of the projects, but the HTTP/2 workflows are still very much the end goal.

oleersoy commented 7 years ago

Another thing that is somewhat related is trimming library components such that only the pieces needed are placed in the JSPM folder and the rest is shaved off. For example if I'm using underscore.js, but only the each function, then ideally only this function makes it into the JSPM folder and the rest of the library, along with any transitive dependencies that the inert code references, are shaved off.