2023-07-23 20:10:04 +00:00
|
|
|
import path from 'node:path'
|
|
|
|
import { defineConfig } from 'vite'
|
|
|
|
import react from '@vitejs/plugin-react'
|
2023-07-30 16:36:44 +00:00
|
|
|
|
2023-07-23 20:10:04 +00:00
|
|
|
import packageJson from './package.json'
|
|
|
|
|
|
|
|
const isDev = process.env.NODE_ENV === 'development'
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
'@': path.resolve(__dirname, './src')
|
|
|
|
}
|
|
|
|
},
|
|
|
|
define: {
|
|
|
|
__DEV__: isDev,
|
|
|
|
__NAME__: JSON.stringify(packageJson.name)
|
|
|
|
},
|
2023-07-30 16:36:44 +00:00
|
|
|
plugins: [react()]
|
2023-07-23 20:10:04 +00:00
|
|
|
})
|