webpack-externals-plugin icon indicating copy to clipboard operation
webpack-externals-plugin copied to clipboard

Webpack 2 Support

Open tomasAlabes opened this issue 9 years ago • 2 comments

Hi, thanks for this plugin! I haven't tried it with webpack 1 but at least with webpack 2 I can't use it. My conf:

new ExternalsPlugin({
    type: 'amd',
    include: process.cwd() + '/bower_components'
}),
10% building modules
Fatal error: Cannot read property 'request' of undefined

https://github.com/Morhaus/webpack-externals-plugin/blob/master/index.js#L19 seems to be it. Time to release a webpack 2 version of the plugin?

tomasAlabes avatar Sep 18 '16 15:09 tomasAlabes

I created this repo meanwhile, as I needed it for a project of mine. If you merge this I can delete mine.

tomasAlabes avatar Sep 19 '16 19:09 tomasAlabes

also have this issue

/Users/steve/Projects/mern-starter/node_modules/webpack-externals-plugin/index.js:19
              data.dependency.request,
                             ^

TypeError: Cannot read property 'request' of undefined
    at /Users/steve/Projects/mern-starter/node_modules/webpack-externals-plugin/index.js:19:30
    at applyPluginsAsyncWaterfall (/Users/steve/Projects/mern-starter/node_modules/webpack/lib/NormalModuleFactory.js:94:13)
    at /Users/steve/Projects/mern-starter/node_modules/tapable/lib/Tapable.js:268:11
    at NormalModuleFactory.params.normalModuleFactory.plugin (/Users/steve/Projects/mern-starter/node_modules/webpack/lib/CompatibilityPlugin.js:52:5)
    at NormalModuleFactory.applyPluginsAsyncWaterfall (/Users/steve/Projects/mern-starter/node_modules/tapable/lib/Tapable.js:272:13)
    at resolver (/Users/steve/Projects/mern-starter/node_modules/webpack/lib/NormalModuleFactory.js:69:10)
    at process.nextTick (/Users/steve/Projects/mern-starter/node_modules/webpack/lib/NormalModuleFactory.js:194:7)
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickCallback (internal/process/next_tick.js:104:9)

codeuniquely avatar Sep 21 '17 03:09 codeuniquely