-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathvue.config.js
54 lines (48 loc) · 1.17 KB
/
vue.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
const autoprefixer = require('autoprefixer')
const tailwindcss = require('tailwindcss')
const path = require('path')
const PrerenderSPAPlugin = require('prerender-spa-plugin')
const ImageminPlugin = require('imagemin-webpack-plugin').default
const imageminMozjpeg = require('imagemin-mozjpeg')
module.exports = {
lintOnSave: false,
productionSourceMap: false,
devServer: {
overlay: {
warnings: false,
errors: true,
},
},
css: {
loaderOptions: {
postcss: {
plugins: [
tailwindcss,
autoprefixer,
],
},
},
},
configureWebpack: {
plugins: [
new PrerenderSPAPlugin({
// Required - The path to the webpack-outputted app to prerender.
staticDir: path.join(__dirname, 'dist'),
// Required - Routes to render.
routes: ['/', '/404'],
}),
new ImageminPlugin({
disable: process.env.NODE_ENV !== 'production', // Disable during development
pngquant: {
quality: '95-100',
},
plugins: [
imageminMozjpeg({
quality: 70,
progressive: true,
}),
],
}),
],
},
}