Browse Source

去除vite压缩插件,会导致vercel和netlify无法打包

v1
zyronon 1 year ago
parent
commit
840ab94d63
  1. 78
      vite.config.js

78
vite.config.js

@ -61,45 +61,45 @@ export default defineConfig({ @@ -61,45 +61,45 @@ export default defineConfig({
}
],
}),
viteCompression({
verbose: false,
disable: false,
threshold: 10240,
algorithm: 'brotliCompress',
}),
viteCompression({
verbose: false,
disable: false,
algorithm: 'gzip',
threshold: 10240,
}),
viteImagemin({
gifsicle: {
optimizationLevel: 7,
interlaced: false,
},
optipng: {
optimizationLevel: 7,
},
mozjpeg: {
quality: 20,
},
pngquant: {
quality: [0.8, 0.9],
speed: 4,
},
svgo: {
plugins: [
{
name: 'removeViewBox',
},
{
name: 'removeEmptyAttrs',
active: false,
},
],
},
}),
// viteCompression({
// verbose: false,
// disable: false,
// threshold: 10240,
// algorithm: 'brotliCompress',
// }),
// viteCompression({
// verbose: false,
// disable: false,
// algorithm: 'gzip',
// threshold: 10240,
// }),
// viteImagemin({
// gifsicle: {
// optimizationLevel: 7,
// interlaced: false,
// },
// optipng: {
// optimizationLevel: 7,
// },
// mozjpeg: {
// quality: 20,
// },
// pngquant: {
// quality: [0.8, 0.9],
// speed: 4,
// },
// svgo: {
// plugins: [
// {
// name: 'removeViewBox',
// },
// {
// name: 'removeEmptyAttrs',
// active: false,
// },
// ],
// },
// }),
],
resolve: {
alias: {

Loading…
Cancel
Save