Commit 4e6c311d authored by Jure's avatar Jure

feat: switch to mini-css-extract-plugin

parent f44d0e35
Pipeline #12016 failed with stages
in 15 seconds
const babelIncludes = require('./babel-includes')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
module.exports = [
{ test: /\.tsx?$/, loader: 'ts-loader' },
......@@ -57,6 +58,15 @@ module.exports = [
{
loader: 'style-loader',
},
{
loader: MiniCssExtractPlugin.loader,
options: {
// you can specify a publicPath here
// by default it uses publicPath in webpackOptions.output
publicPath: '../',
hmr: process.env.NODE_ENV === 'development',
},
},
{
loader: 'css-loader',
options: {
......
......@@ -2,7 +2,7 @@ const path = require('path')
const config = require('config')
const webpack = require('webpack')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const CompressionPlugin = require('compression-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
......@@ -25,7 +25,7 @@ module.exports = (opts = {}) => {
}
if (opts.extractText) {
plugins.push(new ExtractTextPlugin('styles/main.css'))
plugins.push(new MiniCssExtractPlugin())
}
if (opts.noEmitOnErrors) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment