Skip to content

Commit

Permalink
Fix css source map for dev and prod
Browse files Browse the repository at this point in the history
  • Loading branch information
yinanfang committed Nov 9, 2016
1 parent 9206111 commit 38714af
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,14 @@ const babelPresets = Config.IS_DEVELOPMENT ? ['react', 'es2015', 'react-hmre'] :
const cssLoader = Config.IS_DEVELOPMENT ? {
test: /\.css?$/,
loaders: [
'style?sourceMap',
'css?modules&importLoaders=1&localIdentName=[path][name]__[local]__[hash:base64:5]!resolve-url!postcss',
'style',
'css?sourceMap&modules&importLoaders=1&localIdentName=[path][name]__[local]__[hash:base64:5]',
'resolve-url',
'postcss?sourceMap=inline',
],
} : {
test: /\.css$/,
loader: ExtractTextPlugin.extract('style', 'css?modules&importLoaders=1&localIdentName=[path][name]__[local]__[hash:base64:5]!resolve-url!postcss'),
loader: ExtractTextPlugin.extract('style', 'css?sourceMap&modules&importLoaders=1&localIdentName=[path][name]__[local]__[hash:base64:5]!resolve-url!postcss?sourceMap=inline'),
// This doesn't work for now: https://github.com/webpack/extract-text-webpack-plugin/issues/173
// loader: ExtractTextPlugin.extract({
// notExtractLoader: 'style',
Expand Down

0 comments on commit 38714af

Please sign in to comment.