Add an option to auto-detect third-party packages
See original GitHub issueWhen using CommonsChunkPlugin
, each third-party dependency must be added to webpack.config.js
by hand. A plugin with the nameAbstractAwayDependencies
could be written to provide the functionality of abstracting away npm dependencies from the code into a separate file. (By default, vendor-[hash].js
.)
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Add and assign Win32 apps to Microsoft Intune
Learn how to add, assign, and manage Win32 apps with Microsoft ... This type of app is typically written in-house or by a...
Read more >Automating Third-Party Application Creation and Patching in ...
Join Justin Chalfant from Patch My PC for a 100% live demo showing how easy extending SCCM and Intune to automatically create, update...
Read more >Spring Component Scanning - Baeldung
With Spring, we use the @ComponentScan annotation along with the @Configuration annotation to specify the packages that we want to be scanned. @ ......
Read more >MQTT - Home Assistant
To enable a secure the broker certificate should be validated. If your broker uses a trusted certificate then choose auto . This will...
Read more >Buildpacks | Heroku Dev Center
For a list of known third-party buildpacks, see Using a third-party ... the automatic setting of the detected buildpack on your application.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This automatically selects modules based on the path:
But specifying dependencies manually has the advantage that the vendor chunk changes less often.
Hi all, hi @kripod ,
There is an other way to specify implicitly your prod dependencies, here is the trick:
Go to your webpack.config.js file, and add the following module import statement:
const prodDependencies = require('path to your package.json file');
now you need to update your entry points:
entry: { vendor: Object.keys(prodDependencies.dependencies) }
Make sure the name you choose for this entry is the same you use for your CommonsChunkPlugin configuration so that you can move your redendent prod dependencies to that file as well.