improve chunks, mobile, WC, lazyloading, prefetch

This commit is contained in:
lesion
2022-02-08 22:54:47 +01:00
parent 32e48ed64d
commit ba44e53d28
13 changed files with 82 additions and 316 deletions

View File

@@ -1,6 +1,7 @@
const config = require('./server/config.js')
const minifyTheme = require('minify-css-string').default
const isDev = (process.env.NODE_ENV !== 'production')
module.exports = {
telemetry: false,
modern: (process.env.NODE_ENV === 'production') && 'client',
@@ -12,9 +13,11 @@ module.exports = {
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' }
],
link: [{ rel: 'icon', type: 'image/png', href: '/logo.png' }]
link: [{ rel: 'icon', type: 'image/png', href: '/logo.png' }],
link: [{ rel: 'preload', type: 'image/png', href: '/logo.png', as: 'media' }],
script: [{ src: '/gancio-events.es.js', async: true, body: true }],
},
dev: (process.env.NODE_ENV !== 'production'),
dev: isDev,
server: config.server,
@@ -24,6 +27,8 @@ module.exports = {
}
},
css: ['./assets/style.less'],
/*
** Customize the progress-bar component
*/
@@ -106,10 +111,7 @@ module.exports = {
}
}
},
defaultAssets: {
icons: false
}
},
defaultAssets: false
build: {
corejs: 3,
cache: true,