From 98674e40cff2e73c7c066b24d659bf29c7e1ee64 Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Tue, 27 Nov 2018 10:55:31 +0100 Subject: [PATCH] =?UTF-8?q?:bug:=20r=C3=A9pare=20l'effet=20fouc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/webpack.commonLoaders.js | 2 +- source/webpack.prod.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/webpack.commonLoaders.js b/source/webpack.commonLoaders.js index 7ac82e428..b7c540d51 100644 --- a/source/webpack.commonLoaders.js +++ b/source/webpack.commonLoaders.js @@ -3,7 +3,7 @@ module.exports = { { test: /\.css$/, use: [ - 'style-loader', + { loader: 'style-loader' }, { loader: 'css-loader', options: { diff --git a/source/webpack.prod.js b/source/webpack.prod.js index 4d0e24537..35436ef5e 100644 --- a/source/webpack.prod.js +++ b/source/webpack.prod.js @@ -39,8 +39,9 @@ const prerenderConfig = () => ({ // Replace style-loader with MiniCssExtractPlugin.loader common.module.rules .find(rule => rule.test.test('a.css')) - .use.find(loader => (loader || loader.loader) === 'style-loader').loader = + .use.find(loader => loader.loader === 'style-loader').loader = MiniCssExtractPlugin.loader + module.exports = { ...common, mode: 'production',