I have a web perf problem my fonts are in a scss file with font-face but when I use lighthouse my performance is at 65 I create a vue.config.js file but it doesn't change anything
My file vue.config.js
const CompressionPlugin = require('compression-webpack-plugin');
module.exports = {
configureWebpack: {
output: {
crossOriginLoading: 'anonymous'
},
plugins: [
new CompressionPlugin({
filename: '[path].gz[query]',
algorithm: 'gzip',
test: /.(js|css|png|jpg|jpeg|gif|ico|json|woff|ttf|otf|svg|woff2|eot)$/,
threshold: 10240,
minRatio: 0.8
})
]
},
chainWebpack: config => {
/*
Disable (or customize) prefetch, see:
https://cli.vuejs.org/guide/html-and-static-assets.html#prefetch
*/
config.plugins.delete('prefetch');
/*
Configure preload to load all chunks
NOTE: use `allChunks` instead of `all` (deprecated)
*/
config.plugin('preload').tap(options => {
options[0].include = 'allChunks';
return options;
});
}
};
question from:
https://stackoverflow.com/questions/65860044/web-performance-preload-key-fonts-requests-vuejs-3 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…