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

@storybook/react@3.0.0-alpha.1 doesn't work with import inside css in react-scripts@^1 #1084

Closed
oriSomething opened this issue May 21, 2017 · 3 comments

Comments

@oriSomething
Copy link
Contributor

As I wrote in #1073 (I've being asked to open a new issue):

Might related to #1027

But, it doesn't compatible with react-scripts@^1 when it comes to CSS. If you have a CSS files that import other CSS files, it breaks with this error:

ERROR in ./~/css-loader?{"importLoaders":1}!./~/postcss-loader/lib?{"plugins":[null]}!./src/stories/blah.css
Module build failed: TypeError: Cannot read property 'postcss' of null

Code example:

/* a.css */
@import "./b.css";
/* b.css */

:root {
  /* ... */
}
// Story file
import "./a.css";

If there is more information needed, please tell me.

@shilman
Copy link
Member

shilman commented May 21, 2017

Thanks @oriSomething! We'll look into it!

@ndelangen
Copy link
Member

ndelangen commented May 21, 2017

I will look into this.

I have reproduced the issue.

I have a fix!

@ndelangen
Copy link
Member

It should be fixed now:

Successfully published:
 - @storybook/react-native@3.0.0-alpha.3
 - @storybook/react@3.0.0-alpha.3
 - @storybook/addon-actions@3.0.0-alpha.3
 - @storybook/addon-comments@3.0.0-alpha.3
 - @storybook/addon-graphql@3.0.0-alpha.3
 - @storybook/addon-info@3.0.0-alpha.3
 - @storybook/addon-knobs@3.0.0-alpha.3
 - @storybook/addon-links@3.0.0-alpha.3
 - @storybook/addon-notes@3.0.0-alpha.3
 - @storybook/addon-options@3.0.0-alpha.3
 - @storybook/addon-storyshots@3.0.0-alpha.3

@ndelangen ndelangen added this to the v3.0.0 milestone May 21, 2017
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

3 participants