mmiller42 / html-webpack-externals-plugin

Webpack plugin that works alongside html-webpack-plugin to use pre-packaged vendor bundles.
MIT License
99 stars 16 forks source link

How to reference a node_module in the compiled bundle #41

Open mjangir opened 6 years ago

mjangir commented 6 years ago

In my electron project, I've an internal node_modules folder whose all dependencies have been under externals in webpack and they are directly reference by var dep = require('dep'). When the webpack script is run in prod mode, a physical built file is generate that can easily reference the dependencies from any available node_modules.

But in webpack dev mode, I'm using html-webpack-plugin, which creates html file in memory and it never references those externals.

I want to specify that node_modules to this plugin so that all un-resolved dependencies can be looked into this folder as well.