Description
openedon May 6, 2016
If I have a .babelrc
file in the root of my project with an extends
clause, the path doesn't resolve relative to the .babelrc
file. Instead, it seems like it's relative to the .storybook/config.js
file.
For example, consider a directory structure like this:
.storybook/
config.js
node_modules/
another_module/
.babelrc
.babelrc
And say my .babelrc
at the root level has this code:
{ "extends": "./node_modules/another_module/.babelrc" }
This does not work. But if I change the code to (go up a directory first):
{ "extends": "../node_modules/another_module/.babelrc" }
it does work.
I'm not entirely sure what the issue is, but it seems like it would be more intuitive to be able to use paths relative to the root when using the root .babelrc
file.
Of course a solution could be to copy the contents of my root .babelrc
to .storybook/
and make paths relative to that directory (thanks to #149), but then I would need to maintain two .babelrc
files.