Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pack all dependencies defined in package.json #90

Closed

Conversation

miltador
Copy link

This will solve various issues with 'implicit' dependencies that aren't directly used in your code but required by other modules.
The developer himself is responsible to moderate the dependencies list and update it accordingly.

This will solve various issues with 'implicit' dependencies that aren't directly used in your code but required by other modules.
@HyperBrain HyperBrain mentioned this pull request Jun 30, 2017
@HyperBrain
Copy link
Member

HyperBrain commented Jul 1, 2017

I think this PR is counter-productive to the mechanisms and use cases webpack is used for.
When you use wepback, it optimizes the dependencies and removes unneeded ones - this is one of the basic concepts behind it. So only the webpack result states exactly which modules have to be packaged and which not.
Imo the user cannot know, what is needed and what is not.

If you found a problem, please open an issue for it. Then we can discuss it deeply and after it has been discussed how can or should be solved, you can offer a PR for the solution. Just submitting a PR does not offer the right platform for discussions. Especially this change is not trivial, breaking and changes existing functionality.

Nevertheless a big thank you for your contribution 👍 . Please open an issue for the problem.

What I see as a possible improvement in the whole way, the webpack plugin handles the fetching of the npm modules is, that it could retrieve the physical node modules that it packages from the projects node_modules directory instead of using npm to download them on deploy, but that's out of scope for this PR and should be handled and discussed in a separate issue (it is not trivial and has some side-effects).

@HyperBrain
Copy link
Member

The packaging of implicit dependencies has been solved recently ( #186 ) and is available in the V3 pre-release version 3.0.0-rc.1.
Now you can bundle node modules by whitelisting them in node-externals and all transient dependencies (implicit dependencies) will be bundled correctly. The needed modules are perfectly detected by webpack after its optimization phase.

@HyperBrain
Copy link
Member

Closing this PR now. The package handling has been partly rewritten and improved in V3. If anything should be improved further, we should open an issue for that (feature request), so that it can be phased in correctly.

@HyperBrain HyperBrain closed this Aug 10, 2017
@miltador
Copy link
Author

That's cool! Thanks. I already gave up on AWS but this sounds cool.

@HyperBrain
Copy link
Member

BTW: Sorry for the very late responses 😔 . The project was kind of dead from February until we revived it in Juli, but now it's back and I'll try to maintain it as good as possible (including frequent releases, etc.)

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

Successfully merging this pull request may close these issues.

2 participants