Skip to content

Commit

Permalink
Updated CSS loaders to support CSSModules #32
Browse files Browse the repository at this point in the history
  • Loading branch information
sthzg committed Jun 24, 2016
1 parent 20980d8 commit 8c9f46b
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions conf/webpack/Base.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,23 +103,47 @@ class WebpackBaseConfig {
]
},
{
test: /\.(sass|scss)$/,
test: /\.cssmodule\.(sass|scss)$/,
loaders: [
'style',
'css?modules&importLoaders=1&localIdentName=[name]-[local]-[hash:base64:5]',
'sass'
]
},
{
test: /^.((?!cssmodule).)*\.(sass|scss)$/,
loaders: [
'style',
'css',
'sass'
]
},
{
test: /\.less$/,
test: /\.cssmodule\.less$/,
loaders: [
'style',
'css?modules&importLoaders=1&localIdentName=[name]-[local]-[hash:base64:5]',
'less'
]
},
{
test: /^.((?!cssmodule).)*\.less$/,
loaders: [
'style',
'css',
'less'
]
},
{
test: /\.styl$/,
test: /\.cssmodule\.styl$/,
loaders: [
'style',
'css?modules&importLoaders=1&localIdentName=[name]-[local]-[hash:base64:5]',
'stylus'
]
},
{
test: /^.((?!cssmodule).)*\.styl$/,
loaders: [
'style',
'css',
Expand Down

0 comments on commit 8c9f46b

Please sign in to comment.