-
Notifications
You must be signed in to change notification settings - Fork 124
AssertionError: HappyPack: plugin for the loader '1' could not be found! Did you forget to add it to the plugin list? #183
Comments
Have the same issue. Looks like it doesn't work when you pass an id to the loader. This limits you to one Happypack loader at a time since you have no way to reference other. This is a custom app, not one created w/ create-react-app |
Defining module: { rules: [{
test: ...,
// here you configure happypack; pass it the id
loader: 'happypack/loader?id=happybabel',
}] },
...
plugins: [
new HappyPack({
id: 'happybabel',
loaders: [{
loader: 'babel-loader',
// here you configure babel:
options: { babelrc: true, cacheDirectory: true }
}]
})
] That should fix it. Feel free to re-open if you're still having problems! |
Now,It still has this problem. |
Any updates on this one? |
I see the 😕 reactions on the response above. Let me try to explain it differently: a webpack loader can accept options as a string in the form of query: loader: 'babel-loader?opt_one=a&opt_two=b' But it can also accept options in a hash if you define the loader: {
loader: 'babel-loader',
options: { opt_one: 'a', opt_two: 'b' }
} Defining both at the same time does not merge the options. It's either one or the other. In the original snippet, the loader What I meant in my response is to move that So, this part of the snippet configures Webpack to use HappyPack's loader: module: { rules: [{
test: ...,
// here you configure happypack; pass it the id
loader: 'happypack/loader?id=happybabel',
}] } Whereas this part of the snippet configures HappyPack to use Babel loader: plugins: [
new HappyPack({
id: 'happybabel',
loaders: [{
loader: 'babel-loader',
// here you configure babel:
options: { babelrc: true, cacheDirectory: true }
}]
})
] I hope that made it clear. |
it's no use, still has this problem. |
I use webpack 2.6.1 + create-react-app+ happypack, and throw AssertionError: HappyPack: plugin for the loader '1' could not be found! Did you forget to add it to the plugin list?
The text was updated successfully, but these errors were encountered: