Skip to content
This repository has been archived by the owner on Aug 2, 2018. It is now read-only.

Supporting npm packages #456

Open
matthewmueller opened this issue Apr 8, 2015 · 4 comments
Open

Supporting npm packages #456

matthewmueller opened this issue Apr 8, 2015 · 4 comments

Comments

@matthewmueller
Copy link
Contributor

One simple (but not most efficient) way to support NPM packages would be to use the browserify CDN (with standalone), run derequire on it, then re-wrap in Duo.

@dominicbarnes
Copy link
Contributor

With the change @stephenmathieson has made in duojs/package#37, I think we should just add a proper npm provider. The above sounds brittle, especially if you use multiple npm packages.

@matthewmueller
Copy link
Contributor Author

Would this address building nested dependencies? The browserify CDN automatically builds all the dependencies and bundles them.

@dominicbarnes
Copy link
Contributor

Wouldn't each npm package included have it's entire dependency tree bundled? Imagine I include 2 npm modules that have overlapping dependencies, wouldn't it duplicate a lot since each package would be bundled independently?

@matthewmueller
Copy link
Contributor Author

Not necessarily. iirc NPM prunes the dependencies and will move them up a
level if two dependencies require the same dependency. Not sure if we could
catch it before it does this though.
On Tue, Apr 7, 2015 at 22:00 Dominic Barnes [email protected]
wrote:

Wouldn't each npm package included have it's entire dependency tree
bundled? Imagine I include 2 npm modules that have overlapping
dependencies, wouldn't it duplicate a lot since each package would be
bundled independently?


Reply to this email directly or view it on GitHub
#456 (comment).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants