jhnns / rewire-webpack

Dependency injection for webpack bundles
The Unlicense
121 stars 20 forks source link

webpack 1.12 support :)? #16

Closed moimikey closed 8 years ago

moimikey commented 8 years ago

hola @jhnns,

wanted to know what you make of this:

12:27 PM mshertzberg@forge locale2 master ? webpack                                                                 1 ↵ 0.12.7
Error: No module factory available for dependency type: Dependency
    at Compilation.addModuleDependencies (/Users/mshertzberg/Git/locale2/node_modules/webpack/lib/Compilation.js:180:20)
    at Compilation.processModuleDependencies (/Users/mshertzberg/Git/locale2/node_modules/webpack/lib/Compilation.js:170:7)
    at Compilation.<anonymous> (/Users/mshertzberg/Git/locale2/node_modules/webpack/lib/Compilation.js:319:11)
    at /Users/mshertzberg/Git/locale2/node_modules/webpack/lib/Compilation.js:123:4
    at Array.forEach (native)
    at callback (/Users/mshertzberg/Git/locale2/node_modules/webpack/lib/Compilation.js:122:12)
    at Compilation.<anonymous> (/Users/mshertzberg/Git/locale2/node_modules/webpack/lib/Compilation.js:140:10)
    at DependenciesBlock.<anonymous> (/Users/mshertzberg/Git/locale2/node_modules/webpack/lib/NormalModule.js:115:10)
    at DependenciesBlock.onModuleBuild (/Users/mshertzberg/Git/locale2/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:310:10)
    at nextLoader (/Users/mshertzberg/Git/locale2/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:275:25)
    at /Users/mshertzberg/Git/locale2/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:259:5
    at Storage.finished (/Users/mshertzberg/Git/locale2/node_modules/webpack/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:38:16)
    at /Users/mshertzberg/Git/locale2/node_modules/webpack/node_modules/enhanced-resolve/node_modules/graceful-fs/graceful-fs.js:76:16
    at fs.js:334:14
    at /Users/mshertzberg/Git/locale2/node_modules/webpack/node_modules/enhanced-resolve/node_modules/graceful-fs/graceful-fs.js:42:10
    at FSReqWrap.oncomplete (fs.js:95:15)
var RewirePlugin = require('rewire-webpack')

module.exports = {
  devtool: 'eval',
  entry: [
    './test.js',
    './node_modules/browserstack-tape-reporter/index.js'
  ],
  output: {
    path: __dirname,
    filename: 'test-bs.bundle.js'
  },
  plugins: [
    new RewirePlugin()
  ],
  node: {
    fs: 'empty'
  }
}

i've been trying for a day now to get webpack + rewire + browserstack to work. getting very close.

thanks

RSO commented 8 years ago

I can confirm that this issue is introduced in the latest version of Webpack, to be specific, this commit: https://github.com/webpack/webpack/commit/5acfacfdd667f1a0b340f034cae6ce6c198e5c06

I'll try and see if I can find a fix.

jhnns commented 8 years ago

@moimikey thx for reporting this. @RSO thx for helping out. I'll merge and publish this asap.

moimikey commented 8 years ago

yaasssss kill that Class. thanks @RSO & @jhnns!