Skip to content

Commit

Permalink
fix production className to hash
Browse files Browse the repository at this point in the history
  • Loading branch information
zuiidea committed Jun 8, 2017
1 parent 2e3cb59 commit 79eab09
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ module.exports = (webpackConfig) => {
localIdentName: '[hash:base64:5]',
}
const cssLoaders = webpackConfig.module.loaders[3].loader.split('!')
cssLoaders[1] = `css?${JSON.stringify(cssLoaderOption)}`
cssLoaders.map(item => {
if (item.startsWith('css')) {
return `css?${JSON.stringify(cssLoaderOption)}`
}
return item
})
webpackConfig.module.loaders[3].loader = cssLoaders.join('!')

// PreLoaders
Expand Down

0 comments on commit 79eab09

Please sign in to comment.