Skip to content

Commit 8716d44

Browse files
🔧 chore: Vite Plugin Upgrades & Config Optimizations (#6547)
* 🔧 fix: Update compression plugin to version 2 and adjust configuration * 🔧 fix: Adjust compression plugin configuration to set threshold to 10240 * 🔧 fix: Update vite-plugin-node-polyfills to version 0.23.0 and add external polyfills in configuration * 🔧 fix: Downgrade vite-plugin-node-polyfills to version 0.17.0 and remove external polyfills from configuration * 🔧 fix: Update vite-plugin-node-polyfills to version 0.23.0 and remove outdated version from package.json * 🔧 fix: Update vite-plugin-node-polyfills to version 0.23.0 and remove outdated version from package.json * chore: fix vite-plugin-node-polyfills workspace installation --------- Co-authored-by: Danny Avila <[email protected]>
1 parent 64f4e37 commit 8716d44

File tree

4 files changed

+498
-1267
lines changed

4 files changed

+498
-1267
lines changed

client/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
"@types/node": "^20.3.0",
123123
"@types/react": "^18.2.11",
124124
"@types/react-dom": "^18.2.4",
125-
"@vitejs/plugin-react": "^4.2.1",
125+
"@vitejs/plugin-react": "^4.3.4",
126126
"autoprefixer": "^10.4.20",
127127
"babel-plugin-replace-ts-export-assignment": "^0.0.2",
128128
"babel-plugin-root-import": "^6.6.0",
@@ -142,8 +142,8 @@
142142
"ts-jest": "^29.2.5",
143143
"typescript": "^5.3.3",
144144
"vite": "^6.2.3",
145-
"vite-plugin-compression": "^0.5.1",
146-
"vite-plugin-node-polyfills": "^0.17.0",
147-
"vite-plugin-pwa": "^0.21.1"
145+
"vite-plugin-compression2": "^1.3.3",
146+
"vite-plugin-node-polyfills": "^0.23.0",
147+
"vite-plugin-pwa": "^0.21.2"
148148
}
149149
}

client/vite.config.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import react from '@vitejs/plugin-react';
33
import { VitePWA } from 'vite-plugin-pwa';
44
import { defineConfig } from 'vite';
55
import { nodePolyfills } from 'vite-plugin-node-polyfills';
6-
import compression from 'vite-plugin-compression';
6+
import { compression } from 'vite-plugin-compression2';
77
import type { Plugin } from 'vite';
88

99
// https://vitejs.dev/config/
@@ -82,11 +82,7 @@ export default defineConfig({
8282
}),
8383
sourcemapExclude({ excludeNodeModules: true }),
8484
compression({
85-
verbose: true,
86-
disable: false,
87-
threshold: 10240, // compress files larger than 10KB
88-
algorithm: 'gzip',
89-
ext: '.gz',
85+
threshold: 10240,
9086
}),
9187
],
9288
publicDir: './public',
@@ -144,7 +140,7 @@ export default defineConfig({
144140
},
145141
},
146142
/**
147-
* Ignore "use client" waning since we are not using SSR
143+
* Ignore "use client" warning since we are not using SSR
148144
* @see {@link https://github.com/TanStack/query/pull/5161#issuecomment-1477389761 Preserve 'use client' directives TanStack/query#5161}
149145
*/
150146
onwarn(warning, warn) {

0 commit comments

Comments
 (0)