Can't use storybook ^2.0.0 when babel-loader is defined in preLoaders
See original GitHub issueHi!
My webpack configuration is something like this:
{
entry: {...},
output: {...},
module: {
noParse: [/moment.js/],
loaders: [
{ test: /\.json$/, loaders: ['json'] },
{ test: /\.scss$/, loaders: [ 'style', 'css', 'postcss', 'sass' ] },
{ test: /\.css$/, loaders: [ 'style', 'css?-minimize', 'postcss' ] },
{ test: /\.(ttf|eot|otf)(\?v=[0-9]\.[0-9]\.[0-9])?$/, loaders: [ 'file?name=[name].[ext]' ] },
{ test: /\.svg$/, loaders: [ 'file?name=[name].[ext]', 'svg-process' ] },
],
preLoaders: [
{
test: /\.js$/,
loader: 'rebem-layers',
exclude: /node_modules/,
},
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
cacheDirectory: true,
env: {
development: {
presets: [ 'react-hmre' ],
},
},
},
},
{
test: /\.js$/,
loader: 'eslint-loader',
exclude: /node_modules/,
},
],
},
The problem is as I see is, that storybook 2.0.0 defines the new default webpack config. There a default babel-loader is probably defined, and my configuration is not overriding that. I am assuming this also from the fact, that running storybook is now very slow and it shows that babel is trying to transpile everything from node_modules (which is excluded in my configuration).
Reverting to storybook 1.41.0 version was my temporary solution.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Can't run Storybook with Webpack@5 · Issue #15252
Describe the bug When trying to use Storybook in a project that uses webpack@5, and it's not installed as a direct dependency, but...
Read more >Storybook ERROR. Module not found: Error: Can't resolve ' ...
I tried to configure a .storybook/webpack.config.js but it still doesn't work, I can't find the key to resolve this error. I'm using node...
Read more >TypeScript
Storybook is a frontend workshop for building UI components and pages in isolation. Thousands of teams use it for UI development, testing, and...
Read more >@storybook/addon-jest | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >Migrating Versions - webpack 3 documentation
This style is only supported using the legacy option module.loaders . ... Code like this should be refactored as it won't work with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry about the wrong path 😃 I was checking if some of the stories affect the whole picture, and after that I forgot to revert.
I will try the newer version on our full project.
Great. Awesome.