Skip to content

Commit e24af3e

Browse files
Merge pull request #42 from raphaelfabeni/development
Update webpack and webpack-dev-server and also removes Sass-lint
2 parents ab7b53f + b45f643 commit e24af3e

File tree

3 files changed

+861
-598
lines changed

3 files changed

+861
-598
lines changed

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@
66
"main": "index.js",
77
"scripts": {
88
"build": "rimraf dist && webpack && rimraf dist/*.js",
9-
"start": "webpack-dev-server"
9+
"start": "webpack-dev-server --mode=development"
1010
},
1111
"author": "Raphael Fabeni",
1212
"license": "MIT",
13-
"dependencies": {},
1413
"devDependencies": {
1514
"css-loader": "^0.28.5",
16-
"extract-text-webpack-plugin": "^3.0.0",
15+
"mini-css-extract-plugin": "^0.5.0",
1716
"node-sass": "^4.5.3",
1817
"rimraf": "^2.6.1",
1918
"sass-lint": "^1.8.0",
2019
"sass-loader": "^6.0.6",
21-
"sasslint-webpack-plugin": "^1.0.4",
2220
"style-loader": "^0.18.2",
23-
"webpack": "3.8.1",
24-
"webpack-dev-server": "2.11.1",
21+
"stylelint-webpack-plugin": "^0.10.5",
22+
"webpack": "^4.29.0",
23+
"webpack-cli": "^3.2.1",
24+
"webpack-dev-server": "^3.1.14",
2525
"webpack-livereload-plugin": "^0.11.0"
2626
}
2727
}

webpack.config.js

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const ExtractTextPlugin = require('extract-text-webpack-plugin')
1+
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
22
const LiveReloadPlugin = require('webpack-livereload-plugin')
3-
const SassLintPlugin = require('sasslint-webpack-plugin')
3+
// const StyleLintPlugin = require('stylelint-webpack-plugin');
44
const path = require('path')
55
const loaders = require('./loaders.json').loaders
66

@@ -25,24 +25,17 @@ module.exports = {
2525
rules: [
2626
{
2727
test: /\.sass$/,
28-
use: ExtractTextPlugin.extract({
29-
fallback: 'style-loader',
30-
use: [
31-
{ loader: 'css-loader', options: { minimize: true } },
32-
{ loader: 'sass-loader' }
33-
]
34-
})
28+
use: [
29+
MiniCssExtractPlugin.loader,
30+
{ loader: 'css-loader', options: { minimize: true } },
31+
'sass-loader',
32+
]
3533
}
3634
]
3735
},
3836
plugins: [
39-
new SassLintPlugin({
40-
configFile: '.sass-lint.yml',
41-
glob: 'src/**/*.s?(a|c)ss',
42-
failOnWarning: true,
43-
failOnError: true
44-
}),
45-
new ExtractTextPlugin('[name].css'),
37+
// new StyleLintPlugin(options),
38+
new MiniCssExtractPlugin('[name].css'),
4639
new LiveReloadPlugin()
4740
],
4841
devServer: {

0 commit comments

Comments
 (0)