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": {
"css-loader": "~0.28.11",
"extract-text-webpack-plugin": "~4.0.0-beta.0",
"file-loader": "~1.1.11",
"html-webpack-plugin": "~3.2.0",
"url-loader": "~1.0.1",

View File

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