init
This commit is contained in:
@@ -17,21 +17,41 @@ module.exports = {
|
||||
config.resolve.alias.set("@", resolve("src"));
|
||||
config.resolve.alias.set("_c", resolve("src/components"));
|
||||
|
||||
|
||||
config.module.rule('images').test(/\.(png|jpe?g|gif)(\?.*)?$/).use('url-loader').loader('url-loader').options({
|
||||
limit: 10000,
|
||||
esModule: false,
|
||||
outputPath: "images/"
|
||||
})
|
||||
|
||||
config.module.rule('images')
|
||||
.test(/\.(png|jpe?g|gif|svg)(\?.*)?$/)
|
||||
.test(/\.(png|jpe?g|gif)(\?.*)?$/)
|
||||
.use('image-webpack-loader')
|
||||
.loader('image-webpack-loader')
|
||||
.options({
|
||||
bypassOnDebug: true,
|
||||
mozjpeg: {
|
||||
progressive: true,
|
||||
quality: 65
|
||||
},
|
||||
optipng: {
|
||||
enabled: false,
|
||||
},
|
||||
pngquant: {
|
||||
quality: [0.65, 0.90],
|
||||
speed: 4
|
||||
},
|
||||
gifsicle: {
|
||||
interlaced: false,
|
||||
},
|
||||
webp: {
|
||||
quality: 75
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
config.module.rule('images').use('url-loader').loader('url-loader').options({
|
||||
limit: 2,
|
||||
esModule: false,
|
||||
outputPath: "img/"
|
||||
})
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user