-
Notifications
You must be signed in to change notification settings - Fork 98
Example to make this work with webpack / babel-loader #41
Comments
I have, without any issue. I added this plugin to the |
I too get an error in my webpack build after adding
My problem was I added "lodash" to |
I'm facing the same issue here, and I'm wondering if it has to do with babel-plugin-resolver, which I'm using. At index.js#L59, this check in if (value.indexOf('lodash') !== -1) console.log(value);
// -> /Users/jjt/path/to/project/node_modules/lodash
// L59: This conditional always fails because it's an absolute path
if (fp || value == 'lodash') {
// ...
} |
@jjt interesting, would #15 work if we added support for something like
Though because your path there is absolute it would not be possible to transfer that logic between computers Also if someone is interested in making a webpack example it'd be greatly appreciated |
I've gotten the babel plugin to work in a dummy webpack project. 'module': {
'loaders': [{
'loader': 'babel',
'test': /\.js$/,
'exclude': /node_modules/,
'query': {
'plugins': ['lodash'],
'presets': ['es2015']
}
}]
} In next release of babel-plugin-lodash will also allow you to pass the lodash package id so that it won't have to guess: 'query': {
'plugins': [['lodash', { 'id': 'lodash-compat' }]],
'presets': ['es2015']
} |
Nice that was originally how I was going to solve #15 |
This is also how we're able to test |
babel-plugin-lodash looks awesome. However, I can't get it to load in my webpack/ babel-loader pipeline.
Has anyone managed to get it to work in combination with webpack?
The text was updated successfully, but these errors were encountered: