You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So after looking into #93, #57 and #152, it seems like we are moving towards a target where unpkg will be able to serve one file (bundled via rollup most likely) for a given dependency. This is awesome for serving files to the browser, but can also be used for more traditional package management needs.
Roughly, this can translate to one firing a upm install command, which will read dependencies and their versions from package.json or some other manifest and download ONLY the needed file (bundled) for those packages from unpkg.com (as opposed to full tar).
In a way this is similar to pika install, but unpkg adds tremendous speed improvements (specially with warm cache), since the bundling task is performed on server.
That said, I am filing this issue to validate the idea and to gather feedback/interest on having such tool available. I did put together a "concept on paper" implementation here if we want to perceive this idea.
Thoughts/Opinions?
The text was updated successfully, but these errors were encountered:
So far this works well for packages that are bundled for ESM (i.e packages which serve only one file as dependency). Feel free to try using something like:
Install upm package manager using:
npm install -g unpkg-package-manager
then run init command in an existing project (which has dependencies)
upm init
finally, run install command to download the packages
upm install
Obvious issue exists with packages which has multiple files as the dep in module entry point.
Possible solutions to solve this:
unpkg rewrites the imports/requires to include full unpkg url
unpkg provides the `?bundle' flag to download rollupified bundle for the package.
So after looking into #93, #57 and #152, it seems like we are moving towards a target where
unpkg
will be able to serve one file (bundled via rollup most likely) for a given dependency. This is awesome for serving files to the browser, but can also be used for more traditional package management needs.Roughly, this can translate to one firing a
upm install
command, which will read dependencies and their versions frompackage.json
or some other manifest and download ONLY the needed file (bundled) for those packages fromunpkg.com
(as opposed to full tar).In a way this is similar to
pika install
, butunpkg
adds tremendous speed improvements (specially with warm cache), since the bundling task is performed on server.That said, I am filing this issue to validate the idea and to gather feedback/interest on having such tool available. I did put together a "concept on paper" implementation here if we want to perceive this idea.
Thoughts/Opinions?
The text was updated successfully, but these errors were encountered: