mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-04-16 15:20:39 +08:00
Revert "feat: add babel-plugin-react-compiler and configure Vite for optimized chunking"
This reverts commit 1005baabe699251d91b3169843d043c515801642.
This commit is contained in:
parent
bff78d96b4
commit
c2aa9d79ff
@ -93,9 +93,8 @@
|
|||||||
"@types/validator": "^13.15.10",
|
"@types/validator": "^13.15.10",
|
||||||
"@vitejs/plugin-legacy": "^8.0.0",
|
"@vitejs/plugin-legacy": "^8.0.0",
|
||||||
"@vitejs/plugin-react": "^6.0.1",
|
"@vitejs/plugin-react": "^6.0.1",
|
||||||
"adm-zip": "^0.5.16",
|
|
||||||
"axios": "^1.13.6",
|
"axios": "^1.13.6",
|
||||||
"babel-plugin-react-compiler": "^1.0.0",
|
"adm-zip": "^0.5.16",
|
||||||
"cli-color": "^2.0.4",
|
"cli-color": "^2.0.4",
|
||||||
"commander": "^14.0.3",
|
"commander": "^14.0.3",
|
||||||
"cross-env": "^10.1.0",
|
"cross-env": "^10.1.0",
|
||||||
|
|||||||
16
pnpm-lock.yaml
generated
16
pnpm-lock.yaml
generated
@ -179,16 +179,13 @@ importers:
|
|||||||
version: 8.0.1(terser@5.46.1)(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@24.12.0)(jiti@2.6.1)(sass@1.98.0)(terser@5.46.1)(yaml@2.8.3))
|
version: 8.0.1(terser@5.46.1)(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@24.12.0)(jiti@2.6.1)(sass@1.98.0)(terser@5.46.1)(yaml@2.8.3))
|
||||||
'@vitejs/plugin-react':
|
'@vitejs/plugin-react':
|
||||||
specifier: ^6.0.1
|
specifier: ^6.0.1
|
||||||
version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@24.12.0)(jiti@2.6.1)(sass@1.98.0)(terser@5.46.1)(yaml@2.8.3))
|
version: 6.0.1(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@24.12.0)(jiti@2.6.1)(sass@1.98.0)(terser@5.46.1)(yaml@2.8.3))
|
||||||
adm-zip:
|
adm-zip:
|
||||||
specifier: ^0.5.16
|
specifier: ^0.5.16
|
||||||
version: 0.5.16
|
version: 0.5.16
|
||||||
axios:
|
axios:
|
||||||
specifier: ^1.13.6
|
specifier: ^1.13.6
|
||||||
version: 1.14.0
|
version: 1.14.0
|
||||||
babel-plugin-react-compiler:
|
|
||||||
specifier: ^1.0.0
|
|
||||||
version: 1.0.0
|
|
||||||
cli-color:
|
cli-color:
|
||||||
specifier: ^2.0.4
|
specifier: ^2.0.4
|
||||||
version: 2.0.4
|
version: 2.0.4
|
||||||
@ -1985,9 +1982,6 @@ packages:
|
|||||||
peerDependencies:
|
peerDependencies:
|
||||||
'@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0
|
'@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0
|
||||||
|
|
||||||
babel-plugin-react-compiler@1.0.0:
|
|
||||||
resolution: {integrity: sha512-Ixm8tFfoKKIPYdCCKYTsqv+Fd4IJ0DQqMyEimo+pxUOMUR9cVPlwTrFt9Avu+3cb6Zp3mAzl+t1MrG2fxxKsxw==}
|
|
||||||
|
|
||||||
bail@2.0.2:
|
bail@2.0.2:
|
||||||
resolution: {integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==}
|
resolution: {integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==}
|
||||||
|
|
||||||
@ -5442,12 +5436,10 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
'@vitejs/plugin-react@6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@24.12.0)(jiti@2.6.1)(sass@1.98.0)(terser@5.46.1)(yaml@2.8.3))':
|
'@vitejs/plugin-react@6.0.1(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@24.12.0)(jiti@2.6.1)(sass@1.98.0)(terser@5.46.1)(yaml@2.8.3))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@rolldown/pluginutils': 1.0.0-rc.7
|
'@rolldown/pluginutils': 1.0.0-rc.7
|
||||||
vite: 8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@24.12.0)(jiti@2.6.1)(sass@1.98.0)(terser@5.46.1)(yaml@2.8.3)
|
vite: 8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@24.12.0)(jiti@2.6.1)(sass@1.98.0)(terser@5.46.1)(yaml@2.8.3)
|
||||||
optionalDependencies:
|
|
||||||
babel-plugin-react-compiler: 1.0.0
|
|
||||||
|
|
||||||
acorn-jsx@5.3.2(acorn@8.16.0):
|
acorn-jsx@5.3.2(acorn@8.16.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -5531,10 +5523,6 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
babel-plugin-react-compiler@1.0.0:
|
|
||||||
dependencies:
|
|
||||||
'@babel/types': 7.29.0
|
|
||||||
|
|
||||||
bail@2.0.2: {}
|
bail@2.0.2: {}
|
||||||
|
|
||||||
balanced-match@4.0.4: {}
|
balanced-match@4.0.4: {}
|
||||||
|
|||||||
@ -10,11 +10,7 @@ export default defineConfig({
|
|||||||
server: { port: 3000 },
|
server: { port: 3000 },
|
||||||
plugins: [
|
plugins: [
|
||||||
svgr(),
|
svgr(),
|
||||||
react({
|
react(),
|
||||||
babel: {
|
|
||||||
plugins: ['babel-plugin-react-compiler'],
|
|
||||||
},
|
|
||||||
} as any),
|
|
||||||
legacy({
|
legacy({
|
||||||
modernTargets: ['edge>=109', 'safari>=14'],
|
modernTargets: ['edge>=109', 'safari>=14'],
|
||||||
renderLegacyChunks: false,
|
renderLegacyChunks: false,
|
||||||
@ -30,24 +26,6 @@ export default defineConfig({
|
|||||||
outDir: '../dist',
|
outDir: '../dist',
|
||||||
emptyOutDir: true,
|
emptyOutDir: true,
|
||||||
chunkSizeWarningLimit: 4000,
|
chunkSizeWarningLimit: 4000,
|
||||||
rollupOptions: {
|
|
||||||
output: {
|
|
||||||
manualChunks: (id) => {
|
|
||||||
if (id.includes('monaco-yaml')) return 'monaco-yaml'
|
|
||||||
if (
|
|
||||||
id.includes('node_modules/react/') ||
|
|
||||||
id.includes('node_modules/react-dom/')
|
|
||||||
)
|
|
||||||
return 'react'
|
|
||||||
if (id.includes('node_modules/react-router')) return 'router'
|
|
||||||
if (
|
|
||||||
id.includes('node_modules/i18next') ||
|
|
||||||
id.includes('node_modules/react-i18next')
|
|
||||||
)
|
|
||||||
return 'i18n'
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
@ -58,13 +36,4 @@ export default defineConfig({
|
|||||||
define: {
|
define: {
|
||||||
OS_PLATFORM: `"${process.platform}"`,
|
OS_PLATFORM: `"${process.platform}"`,
|
||||||
},
|
},
|
||||||
optimizeDeps: {
|
|
||||||
include: [
|
|
||||||
'react',
|
|
||||||
'react-dom',
|
|
||||||
'react-router-dom',
|
|
||||||
'i18next',
|
|
||||||
'react-i18next',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user