Improve style depencencies.

This commit is contained in:
Alexis Lahouze 2018-06-10 14:21:06 +02:00
parent e641759ff7
commit 7ca6a9827a
2 changed files with 9 additions and 11 deletions

View File

@ -2,7 +2,6 @@
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const helpers = require('./helpers');
module.exports = {
@ -78,21 +77,19 @@ module.exports = {
loader: 'html-loader'
}, {
test: /\.css$/,
exclude: helpers.root('src'),
loader: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: 'css-loader?sourceMap'
})
}, {
test: /\.css$/,
include: helpers.root('src'),
loader: 'css-loader'
//include: helpers.root('src'),
use: [
'style-loader',
'css-loader',
'resolve-url-loader'
]
}, {
test: /\.scss$/,
use: [
'style-loader',
'css-loader',
'sass-loader',
'resolve-url-loader',
'sass-loader?sourceMap'
]
}, {
test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/,

View File

@ -38,6 +38,7 @@
"node-sass": "^4.7.2",
"null-loader": "^0.1.1",
"raw-loader": "^0.5.1",
"resolve-url-loader": "^2.3.0",
"sass-loader": "^7.0.2",
"script-ext-html-webpack-plugin": "^2.0.1",
"style-loader": "^0.21.0",