css-modules / postcss-icss-values

Pass arbitrary constants between your module files
MIT License
203 stars 18 forks source link

Importing value results in undefined #16

Closed dfala closed 7 years ago

dfala commented 8 years ago

Followed steps on README file, but primary and secondary get a value of undefined on my-component.css.

margalit commented 8 years ago

For anyone else experiencing similar issues in webpack be sure to add &importLoaders=1 to your css loader string as per the PostCSS loader readme. For example:

{ test: /\.css$/, loader: 'style!css?modules&localIdentName=[name]---[local]---[hash:base64:5]&importLoaders=1!postcss-loader' }

haohcraft commented 8 years ago

@margalit whats the importLoaders=1 for?

haohcraft commented 8 years ago

Found an explanation from here