-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix loader concatentation bug #173
Conversation
I need more information. I can't see what this solves anything. This change seems to have no effect on anything. Am I wrong? |
If I have a custom webpack config that looks like this, it'll break:
I can fix it, by changing it to this:
Take a look at these lines: https://github.com/kadirahq/react-storybook/blob/master/src/server/config.js#L90-L93 If |
Okay. I got it. return {
...customConfig,
// We'll always load our configurations after the custom config.
// So, we'll always load the stuff we need.
...config,
// We need to use our and custom plugins.
plugins: [
...config.plugins,
...customConfig.plugins || [],
],
module: {
...config.module,
// We need to use our and custom loaders.
...customConfig.module || {},
loaders: [
...config.module.loaders,
...customConfig.module? customConfig.module.loaders || [] : {},
],
},
}; Isn't it? |
I think instead of |
@stefvhuynh Your PR sounds great. I'll do a release within today. |
View your CI Pipeline Execution ↗ for commit 01f687d.
☁️ Nx Cloud last updated this comment at |
This has to do with using custom
webpack.config.js
files. The code tries to addcustomConfig.module.loaders
. And ifcustomConfig.module
is not defined, there is an error.