Hi guys I'm trying to define a webpack resolve in .storybook/webpack.config.js
resolve : {
modules : [
path.resolve('./src'),
'node_modules',
],
},
In order to use in my styles :
import variables from 'theme/varables';
in the theme folder I have a package.json with
{
"name" : "@theme"
}
webpack output :

Any idea?
thanks
NVM this solve the issue https://github.com/tleunen/babel-plugin-module-resolver
Can we close this issue ?
Let us know if this issue still exist 馃憣 ?
I can confirm this issue still happens. Using babel-plugin-module-resolver seems a quickfix to me, as it implies adding a new plugin only to get storybook working.
Okay for anyone that encounter the same issue: that's because we must use modulesDirectories instead of modules for webpack v1, which Storybook use for the moment (v2.35).
https://webpack.github.io/docs/resolving.html
This would be good to document the fact that Storybook uses webpack v1 (or to insist on it if I actually missed it :) ), as it is deprecated and we find lesser resources using v1 syntax.
Or shall we try to move to Webpack v2? 馃拑
We will move over to webpack 2.