Skip to content

Conversation

@stevewillard
Copy link

Fixes #84

@rbartoli
Copy link

rbartoli commented Jul 6, 2015

I've tested this fix and it works. Is it possible to merge it please?

@markdalgleish
Copy link
Member

This fixes the issue, but drops the test coverage. @sokra any thoughts on how we should test the treatment of source maps?

markdalgleish added a commit that referenced this pull request Jul 13, 2015
@markdalgleish
Copy link
Member

Thanks for the original PR, but I needed to add tests for this for the coverage check to pass.

This issue should now be fixed in v0.15.3.

@moretti
Copy link
Contributor

moretti commented Jul 13, 2015

@markdalgleish
I've just updated to 1.5.3 (from 1.4.5) and I still have a similar issue:

ERROR in ./~/css-loader?module&localIdentName=[name]__[local]___[hash:base64:5]!./~/postcss-loader!./src/app/App.css
Module build failed: Error: "myApp/App.css" is not in the SourceMap.
    at SourceMapConsumer_sourceContentFor [as sourceContentFor] (myApp/node_modules/css-loader/node_modules/postcss/node_modules/source-map/lib/source-map/source-map-consumer.js:677:15)
    at Input.origin (myApp/node_modules/css-loader/node_modules/postcss/lib/input.js:91:31)
    at Input.error (myApp/node_modules/css-loader/node_modules/postcss/lib/input.js:61:27)
    at Rule.error (myApp/node_modules/css-loader/node_modules/postcss/lib/node.js:68:38)
    at myApp/node_modules/css-loader/node_modules/postcss-modules-local-by-default/index.js:240:20
    at myApp/node_modules/css-loader/node_modules/postcss/lib/container.js:141:30
    at myApp/node_modules/css-loader/node_modules/postcss/lib/container.js:102:26
    at Root.each (myApp/node_modules/css-loader/node_modules/postcss/lib/container.js:89:22)
    at Root.eachInside (myApp/node_modules/css-loader/node_modules/postcss/lib/container.js:101:21)
    at Root.eachRule (myApp/node_modules/css-loader/node_modules/postcss/lib/container.js:139:21)
 @ ./src/app/App.css 4:14-178 13:2-17:4 14:20-184

Here's my webpack.config configuration:

// ...
module: {
  loaders: [
     { test: /\.css$/, loaders: ['style', 'css?module&localIdentName=[name]__[local]___[hash:base64:5]', 'postcss'] },
     // ...
  ],
},
postcss: [
  require('postcss-import'),
  require('postcss-custom-properties')(),
  require('postcss-calc'),
  require('postcss-color-function')(),
  require('postcss-media-minmax')(),
  require('postcss-custom-media')(),
  require('autoprefixer-core'),
],
// ...

@markdalgleish
Copy link
Member

@moretti This looks like a different error. Could you open a new issue?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants