Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override webpack revolve not working #710

Closed
MarvinAmador7 opened this issue Mar 1, 2017 · 7 comments
Closed

Override webpack revolve not working #710

MarvinAmador7 opened this issue Mar 1, 2017 · 7 comments

Comments

@MarvinAmador7
Copy link

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 :
react storybook 2017-03-01 17-45-11

Any idea?
thanks

@MarvinAmador7
Copy link
Author

@ndelangen
Copy link
Member

Can we close this issue ?

@ndelangen
Copy link
Member

Let us know if this issue still exist 👌 ?

@eric-burel
Copy link
Contributor

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.

@eric-burel
Copy link
Contributor

eric-burel commented Apr 7, 2017

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.

@xavxyz
Copy link
Member

xavxyz commented Apr 7, 2017

Or shall we try to move to Webpack v2? 💃

@ndelangen
Copy link
Member

We will move over to webpack 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants