Skip to content

Commit

Permalink
chore: bump vite to v6
Browse files Browse the repository at this point in the history
  • Loading branch information
devhaozi committed Nov 27, 2024
1 parent c0e32b4 commit bdd1565
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions web/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import type { ConfigEnv } from 'vite'
import { defineConfig, loadEnv } from 'vite'

import { createViteProxy, viteDefine } from './build/config'
import { setupVitePlugins } from './build/plugins'
import { convertEnv, getRootPath, getSrcPath } from './build/utils'

export default defineConfig((configEnv: ConfigEnv) => {
export default defineConfig(({ mode }) => {
const srcPath = getSrcPath()
const rootPath = getRootPath()

const viteEnv = convertEnv(loadEnv(configEnv.mode, process.cwd()))
const viteEnv = convertEnv(loadEnv(mode, process.cwd()))

const { VITE_PORT, VITE_PUBLIC_PATH, VITE_USE_PROXY, VITE_PROXY_TYPE } = viteEnv
return {
Expand All @@ -35,13 +34,6 @@ export default defineConfig((configEnv: ConfigEnv) => {
commonjsOptions: {
ignoreTryCatch: false
}
},
css: {
preprocessorOptions: {
scss: {
api: 'modern-compiler' // or 'modern'
}
}
}
}
})

0 comments on commit bdd1565

Please sign in to comment.