Skip to content

Commit

Permalink
remove style-loader, fixed #61
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist committed Nov 12, 2016
1 parent adc3856 commit afbb14a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions template/build/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ const config = require('./config')
const _ = module.exports = {}

_.cssLoader = config.cssModules ?
'style-loader!css-loader?-autoprefixer&modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!postcss-loader' :
'style-loader!css-loader?-autoprefixer!postcss-loader'
'css-loader?-autoprefixer&modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]' :
'css-loader?-autoprefixer'

_.outputPath = config.electron ?
path.join(__dirname, '../app/dist') :
Expand Down
2 changes: 1 addition & 1 deletion template/build/webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ base.plugins.push(
base.module.loaders.push(
{
test: /\.css$/,
loader: _.cssLoader
loader: `style-loader!${_.cssLoader}!postcss-loader`
}
)

Expand Down
4 changes: 2 additions & 2 deletions template/build/webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ base.plugins.push(
})
)

// extrac css in standalone .css files
// extract css in standalone .css files
base.module.loaders.push({
test: /\.css$/,
loader: ExtractTextPlugin.extract({
loader: _.cssLoader,
loader: [_.cssLoader, 'postcss-loader'],
fallbackLoader: 'style-loader'
})
})
Expand Down

0 comments on commit afbb14a

Please sign in to comment.