Css-loader: source maps with css modules

Created on 18 Jun 2015  路  2Comments  路  Source: webpack-contrib/css-loader

I'd like to be able to see the source selector name mapped into CSS output. Is there any way? What would the webpack loader configuration look like?

Most helpful comment

+1 @markdalgleish any idea how to do this?

I got this working by adding css?sourceMap and sass?sourceMap to my loader, as follows:

{
  test: /\.(css|scss)$/,
  exclude: /node_modules/,
  loader: 'style!css?sourceMap&modules&localIdentName=[name]__[local]___[hash:base64:5]!sass?sourceMap!autoprefixer'
}

All 2 comments

+1 @markdalgleish any idea how to do this?

I got this working by adding css?sourceMap and sass?sourceMap to my loader, as follows:

{
  test: /\.(css|scss)$/,
  exclude: /node_modules/,
  loader: 'style!css?sourceMap&modules&localIdentName=[name]__[local]___[hash:base64:5]!sass?sourceMap!autoprefixer'
}

Thanks @hadimichael

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fengyun2 picture fengyun2  路  4Comments

felipecarrillo100 picture felipecarrillo100  路  3Comments

mareksuscak picture mareksuscak  路  5Comments

grydstedt picture grydstedt  路  3Comments

dmiller9911 picture dmiller9911  路  3Comments