Adds support for preLoaders in custom webpack config#107
Adds support for preLoaders in custom webpack config#107arunoda merged 2 commits intostorybookjs:masterfrom
Conversation
| module: { | ||
| ...config.module, | ||
| // We need to use our and custom loaders. | ||
| preLoaders: [ |
There was a problem hiding this comment.
Actually, there's a much better generic way to deal with this.
Try this instead of this one. I hope it'll work.
...customConfig.module || {},If this works, send me a PR with that.
There was a problem hiding this comment.
I think we need on each loader, because if we default to empty object it won't use default config.
There was a problem hiding this comment.
Yep, this won't work, if we do it ^ this way and customConfig.module contains loader it will override loader in config.module.
There was a problem hiding this comment.
Hmm. Did you try that, it's add loaders but in the line 62 it'll get override again with the our own loaders?
If that's not working, I'll take this in.
There was a problem hiding this comment.
Ahh I see. Sorry I misunderstood, I thought you meant remove whole loaders: [] block too. But this works nicely. Thanks!
…Support for postLoaders
|
This is great. Thanks. |
|
Released with |
* Adds support for preLoaders in custom webpack config * Changes the way it loads custom webpacck config to more generic way. Support for postLoaders
|
View your CI Pipeline Execution ↗ for commit 2005b27
☁️ Nx Cloud last updated this comment at |
story-exports: provide better feedback when using filters
Fixes #90
Adds support for preLoaders to be added to custom webpack config. This allows you to use preLoaders that need to be run before loaders, like code linting, hinting etc.
Was considering adding support for postLoaders too, but I don't have any experience with them so will leave it for now.