Root babel.config.js not loaded
See original GitHub issueDescribe the bug
Storybook does not load any babel.config.js
files (in either root or .storybook
). It only loads .storybook/.babelrc
files.
To Reproduce Steps to reproduce the behavior:
- Create a new storybook app
- Add a root-level
babel.config.js
file - Run app
- See that config is not loaded
Expected behavior Storybook should be able to load both babel config formats.
Code snippets I believe this is the code responsible: https://github.com/storybooks/storybook/blob/fba0541a2bbbd3b51943b21d3f8d2282e33286d6/lib/core/src/server/utils/load-custom-babel-config.js#L62
System:
- OS: MacOS
- Device: Macbook Pro 2018
- Framework: React
- Version: 5.x
Additional context https://github.com/emotion-js/emotion/issues/1306
Issue Analytics
- State:
- Created 4 years ago
- Reactions:25
- Comments:25 (5 by maintainers)
Top Results From Across the Web
Config Files - Babel.js
New in Babel 7.x, Babel has a concept of a "root" directory, which defaults to the current working directory. For project-wide configuration, Babel...
Read more >npx babel not reading configuration from babel.config.js
I noticed in the npx babel --help it stated that --no-babelrc flag ignores configuration from .babelrc and .babelignore files. Does this suggest ...
Read more >babel-loader - webpack
This package allows transpiling JavaScript files using Babel and webpack. ... loader in the webpack config (which is not valid anymore as of...
Read more >Babel Config option | ts-jest - GitHub Pages
You can also use \<rootDir> in the path, or use an absolute path (this last one is strongly not recommended). // jest.config.js module.exports ......
Read more >Configuration Reference | Vue CLI
vue.config.js is an optional config file that will be automatically loaded by @vue/cli-service if it's present in your project root (next to ...
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
I created an empty
.babelrc
in thestorybook
config directory and it respects my rootbabel.config.js
Nope,
babelModeV7: true
didn’t make a difference