Skip to content

Commit

Permalink
Update webpack and webpack-dev-server and also removes Sass-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelfabeni committed Feb 2, 2019
1 parent e9ad3d7 commit b45f643
Show file tree
Hide file tree
Showing 3 changed files with 861 additions and 598 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@
"main": "index.js",
"scripts": {
"build": "rimraf dist && webpack && rimraf dist/*.js",
"start": "webpack-dev-server"
"start": "webpack-dev-server --mode=development"
},
"author": "Raphael Fabeni",
"license": "MIT",
"dependencies": {},
"devDependencies": {
"css-loader": "^0.28.5",
"extract-text-webpack-plugin": "^3.0.0",
"mini-css-extract-plugin": "^0.5.0",
"node-sass": "^4.5.3",
"rimraf": "^2.6.1",
"sass-lint": "^1.8.0",
"sass-loader": "^6.0.6",
"sasslint-webpack-plugin": "^1.0.4",
"style-loader": "^0.18.2",
"webpack": "3.8.1",
"webpack-dev-server": "2.11.1",
"stylelint-webpack-plugin": "^0.10.5",
"webpack": "^4.29.0",
"webpack-cli": "^3.2.1",
"webpack-dev-server": "^3.1.14",
"webpack-livereload-plugin": "^0.11.0"
}
}
25 changes: 9 additions & 16 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const LiveReloadPlugin = require('webpack-livereload-plugin')
const SassLintPlugin = require('sasslint-webpack-plugin')
// const StyleLintPlugin = require('stylelint-webpack-plugin');
const path = require('path')
const loaders = require('./loaders.json').loaders

Expand All @@ -25,24 +25,17 @@ module.exports = {
rules: [
{
test: /\.sass$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [
{ loader: 'css-loader', options: { minimize: true } },
{ loader: 'sass-loader' }
]
})
use: [
MiniCssExtractPlugin.loader,
{ loader: 'css-loader', options: { minimize: true } },
'sass-loader',
]
}
]
},
plugins: [
new SassLintPlugin({
configFile: '.sass-lint.yml',
glob: 'src/**/*.s?(a|c)ss',
failOnWarning: true,
failOnError: true
}),
new ExtractTextPlugin('[name].css'),
// new StyleLintPlugin(options),
new MiniCssExtractPlugin('[name].css'),
new LiveReloadPlugin()
],
devServer: {
Expand Down
Loading

0 comments on commit b45f643

Please sign in to comment.