plasticine / inject-loader

💉📦 A Webpack loader for injecting code into modules via their dependencies.
https://www.npmjs.com/package/inject-loader
MIT License
482 stars 47 forks source link

Not working with babel 6 #13

Closed ondrejsevcik closed 8 years ago

ondrejsevcik commented 8 years ago

Hi, I've just upgraded from Babel 5.3.3 to Babel 6.9.0 and a lot of my tests stopped working. I'm using latest jasmine (2.4) with karma test runner and webpack as a preprocessor.

// my package.json setup
"babel-core": "6.9.0",
"babel-loader": "6.2.4",
"babel-preset-es2015": "6.9.0",
"babel-preset-react": "6.5.0",
"babel-preset-stage-0": "6.5.0",
"babel-plugin-transform-decorators-legacy": "1.3.4",
"inject-loader": "2.0.1",

Do you have any idea where is the problem? My guess is it's because inject-loader was written for Babel 5 but wasn't upgraded for babel 6 yet. Is that right?

aaronjensen commented 8 years ago

@ondrejsevcik you'll probably need https://github.com/59naga/babel-plugin-add-module-exports

We need this to get inject-loader working properly, unfortunately.

ondrejsevcik commented 8 years ago

Awesome! it works as expected.

Thank you