Skip to content

Commit

Permalink
Remove ExtractTextPlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanlawson committed Jan 19, 2018
1 parent 9c3c45a commit 29b0c98
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions webpack.client.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const webpack = require('webpack');
const config = require('sapper/webpack/config.js');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');

const isDev = config.dev;
Expand All @@ -26,19 +25,12 @@ module.exports = {
}
}
},
isDev && {
{
test: /\.css$/,
use: [
{ loader: 'style-loader' },
{ loader: 'css-loader' }
{ loader: 'css-loader', options: { sourceMap:isDev } }
]
},
!isDev && {
test: /\.css$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [{ loader: 'css-loader', options: { sourceMap:isDev } }]
})
}
].filter(Boolean)
},
Expand All @@ -51,7 +43,6 @@ module.exports = {
].concat(isDev ? [
new webpack.HotModuleReplacementPlugin()
] : [
new ExtractTextPlugin('main.css'),
new webpack.optimize.ModuleConcatenationPlugin(),
new UglifyJSPlugin()
]).filter(Boolean),
Expand Down

0 comments on commit 29b0c98

Please sign in to comment.