-
Notifications
You must be signed in to change notification settings - Fork 1
/
vue.config.js
72 lines (68 loc) · 1.78 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
const path = require('path')
const PrerenderSPAPlugin = require('prerender-spa-plugin')
module.exports = {
configureWebpack: {
resolve: {
alias: require('./aliases.config').webpack
},
plugins: [
new PrerenderSPAPlugin({
// Required - The path to the webpack-outputted app to prerender.
staticDir: path.join(__dirname, 'dist'),
// Required - Routes to render.
routes: [
'/',
'/login',
'/signup',
'/restore',
'/after-sign-up',
'/account',
'/policy',
'/terms',
'/about',
'/features',
'/oauth2',
'/ui',
'/404',
],
})
]
},
pwa: {
name: 'Ptah — landing page builder for games.',
iconPaths: {
favicon32: 'https://s3.protocol.one/images/icons/ptah_icon-32.png',
favicon16: 'https://s3.protocol.one/images/icons/ptah_icon-16.png',
appleTouchIcon: 'https://s3.protocol.one/images/icons/ptah_icon-152.png',
msTileImage: 'https://s3.protocol.one/images/icons/ptah_icon-114.png'
}
},
css: {
loaderOptions: {
scss: {
prependData: `@import "@assets/styles/styles.scss";`
}
}
},
chainWebpack: config => {
// удаляем prefetch плагин:
config.plugins.delete('prefetch')
const svgRule = config.module.rule("svg");
svgRule.uses.clear();
svgRule
.use("babel-loader")
.loader("babel-loader")
.end()
.use("vue-svg-loader")
.loader("vue-svg-loader")
.options({
svgo: {
plugins: [
{ removeDimensions: true },
{ removeUselessStrokeAndFill: true },
{ removeViewBox: false }
]
}
});
}
}