ExtractTextPlugin is deprecated (and only really needed for production)

This commit is contained in:
Timothy Farrell 2019-08-21 20:23:11 -05:00
parent 1732d0f602
commit 310fd74a1d
2 changed files with 1 additions and 7 deletions

View File

@ -34,7 +34,6 @@
}, },
"devDependencies": { "devDependencies": {
"css-loader": "~0.28.11", "css-loader": "~0.28.11",
"extract-text-webpack-plugin": "~4.0.0-beta.0",
"file-loader": "~1.1.11", "file-loader": "~1.1.11",
"html-webpack-plugin": "~3.2.0", "html-webpack-plugin": "~3.2.0",
"url-loader": "~1.0.1", "url-loader": "~1.0.1",

View File

@ -1,6 +1,5 @@
const path = require('path'); const path = require('path');
const webpack = require('webpack'); const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin');
const server = require('./server/index.js'); const server = require('./server/index.js');
const { formatHeaders } = require('./server/headers.js'); const { formatHeaders } = require('./server/headers.js');
@ -38,10 +37,7 @@ module.exports = {
rules: [ rules: [
{ {
test: /\.css$/, test: /\.css$/,
use: ExtractTextPlugin.extract({ loader: 'css-loader'
fallback: 'style-loader',
use: 'css-loader'
})
}, },
// fonts // fonts
{ {
@ -56,7 +52,6 @@ module.exports = {
}, },
plugins: [ plugins: [
new webpack.DefinePlugin({ __DEV__: true }), new webpack.DefinePlugin({ __DEV__: true }),
new ExtractTextPlugin('app.css', { allChunks: true }),
new HtmlWebpackPlugin({ new HtmlWebpackPlugin({
template: 'index.template.html', template: 'index.template.html',
inject: 'body' inject: 'body'