2023-05-02 15:22:46 +00:00
|
|
|
import { PluginOption, defineConfig } from 'vite'
|
2023-05-25 07:55:30 +00:00
|
|
|
import path from 'path'
|
2023-05-02 15:22:46 +00:00
|
|
|
import vue from '@vitejs/plugin-vue'
|
2023-10-23 10:34:28 +00:00
|
|
|
// Import Rollup Plugin Visualizer for bundle visualization
|
2023-05-02 15:22:46 +00:00
|
|
|
import { visualizer } from 'rollup-plugin-visualizer'
|
2023-04-14 13:58:13 +00:00
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
2023-10-20 13:37:29 +00:00
|
|
|
plugins: [vue(), visualizer() as PluginOption],
|
2023-10-23 10:34:28 +00:00
|
|
|
/* Set the 'src' alias to '@' */
|
2023-04-20 08:04:08 +00:00
|
|
|
resolve: {
|
|
|
|
alias: {
|
2023-05-02 15:22:46 +00:00
|
|
|
'@': path.resolve(__dirname, './src'),
|
2023-04-20 08:04:08 +00:00
|
|
|
},
|
|
|
|
},
|
2023-10-22 08:53:39 +00:00
|
|
|
esbuild: {
|
|
|
|
drop: ['console', 'debugger'],
|
|
|
|
},
|
2023-10-24 16:33:26 +00:00
|
|
|
build: {
|
|
|
|
// Dist dir name
|
|
|
|
assetsDir: 'kun',
|
|
|
|
},
|
2023-10-23 10:34:28 +00:00
|
|
|
// Suppress i18n warnings
|
2023-06-07 10:10:53 +00:00
|
|
|
define: {
|
|
|
|
__VUE_I18N_FULL_INSTALL__: true,
|
|
|
|
__VUE_I18N_LEGACY_API__: false,
|
|
|
|
__INTLIFY_PROD_DEVTOOLS__: false,
|
|
|
|
},
|
2023-05-02 15:22:46 +00:00
|
|
|
})
|