@@ -2,12 +2,10 @@ const path = require('path');
2
2
const webpack = require ( 'webpack' ) ;
3
3
const UglifyJsPlugin = require ( 'uglifyjs-webpack-plugin' ) ;
4
4
const MiniCssExtractPlugin = require ( "mini-css-extract-plugin" ) ;
5
- const CleanWebpackPlugin = require ( 'clean-webpack-plugin' ) ;
6
5
const StyleLintPlugin = require ( 'stylelint-webpack-plugin' ) ;
7
6
const WebpackBar = require ( 'webpackbar' ) ;
8
7
const CopyPlugin = require ( 'copy-webpack-plugin' ) ;
9
8
const FriendlyErrorsWebpackPlugin = require ( 'friendly-errors-webpack-plugin' ) ;
10
- const ImageminPlugin = require ( 'imagemin-webpack-plugin' ) . default ;
11
9
12
10
module . exports = {
13
11
stats : 'none' ,
@@ -26,7 +24,12 @@ module.exports = {
26
24
exclude : / n o d e _ m o d u l e s / ,
27
25
loader : "eslint-loader" ,
28
26
options : {
29
- configFile : '.eslintrc.json'
27
+ cache : false ,
28
+ configFile : '.eslintrc.json' ,
29
+ emitError : true ,
30
+ emitWarning : true ,
31
+ failOnError : false ,
32
+ failOnWarning : false ,
30
33
}
31
34
} ,
32
35
{
@@ -92,39 +95,13 @@ module.exports = {
92
95
name : '[path][name].[ext]' ,
93
96
outputPath : 'Images/'
94
97
}
95
- } ,
96
- {
97
- loader : 'image-webpack-loader' ,
98
- options : {
99
- cacheFolder : path . resolve ( './cache' ) ,
100
- mozjpeg : {
101
- progressive : true ,
102
- quality : 65
103
- } ,
104
- // optipng.enabled: false will disable optipng
105
- optipng : {
106
- enabled : false ,
107
- } ,
108
- pngquant : {
109
- quality : [ 0.65 , 0.90 ] ,
110
- speed : 4
111
- } ,
112
- gifsicle : {
113
- interlaced : false ,
114
- } ,
115
- // the webp option will enable WEBP
116
- webp : {
117
- quality : 75
118
- }
119
- }
120
98
}
121
99
]
122
100
}
123
101
]
124
102
} ,
125
103
plugins : [
126
104
new webpack . ProgressPlugin ( ) ,
127
- // new CleanWebpackPlugin(),
128
105
new WebpackBar ( {
129
106
clear : false ,
130
107
profile : true ,
@@ -136,42 +113,24 @@ module.exports = {
136
113
sourceMap : true
137
114
} ) ,
138
115
new CopyPlugin (
139
- [ { from : 'Assets/Images/Misc' , to : 'Images/Misc' } ] ,
140
- { copyUnmodified : true }
116
+ [ {
117
+ from : 'Assets/Images/Misc' , to : 'Images/Misc' ,
118
+ cache : true ,
119
+ } ]
141
120
) ,
142
121
new CopyPlugin ( [
143
- { from : 'Assets/JavaScripts/static' , to : 'JavaScripts' } ,
144
- { from : 'Assets/CKEditor' , to : 'CKEditor' }
122
+ { from : 'Assets/JavaScripts/static' , to : 'JavaScripts' , cache : true } ,
123
+ { from : 'Assets/CKEditor' , to : 'CKEditor' , cache : true } ,
145
124
] ) ,
146
- new ImageminPlugin ( {
147
- test : / \. ( j p e ? g | p n g | g i f | s v g ) $ / i,
148
- options : {
149
- cacheFolder : path . resolve ( './cache' ) ,
150
- mozjpeg : {
151
- progressive : true ,
152
- quality : 65
153
- } ,
154
- // optipng.enabled: false will disable optipng
155
- optipng : {
156
- enabled : false ,
157
- } ,
158
- pngquant : {
159
- quality : [ 0.65 , 0.90 ] ,
160
- speed : 4
161
- } ,
162
- gifsicle : {
163
- interlaced : false ,
164
- } ,
165
- // the webp option will enable WEBP
166
- webp : {
167
- quality : 75
168
- }
169
- }
170
- } ) ,
171
125
new StyleLintPlugin ( {
172
126
configFile : ".stylelintrc.json" ,
173
127
syntax : 'scss' ,
174
128
files : '**/*.scss' ,
129
+ quiet : false ,
130
+ emitError : true ,
131
+ emitWarning : true ,
132
+ failOnError : false ,
133
+ failOnWarning : false ,
175
134
} ) ,
176
135
] ,
177
136
} ;
0 commit comments