123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- import {fileURLToPath, URL} from 'node:url'
- import {defineConfig} from 'vite'
- import vue from '@vitejs/plugin-vue'
- import tryFiles from "./src/lib/try_files.js"
- // https://vitejs.dev/config/
- export default defineConfig({
- plugins: [
- tryFiles,
- vue()
- ],
- resolve: {
- alias: {
- '@': fileURLToPath(new URL('./src', import.meta.url))
- }
- },
- server: {
- host: '0.0.0.0',
- port: 5174
- },
- root: 'src',
- publicDir: '@/public',
- build: {
- rollupOptions: {
- input: [
- '@/views/index/index.html',
- '@/views/account/reset.html',
- '@/views/email/verify.html',
- '@/views/login/index.html',
- '@/views/login/ticket.html',
- '@/views/login/otp.html',
- '@/views/register/index.html',
- '@/views/layout.html',
- /** portal **/
- '@/views/portal/index.html',
- '@/views/portal/post.html',
- '@/views/portal/products/index.html',
- '@/views/portal/products/cdn/index.html',
- ],
- output: {
- assetFileNames: 'views/assets/app-[hash].[ext]',
- entryFileNames: 'views/assets/app-[hash].js',
- chunkFileNames: 'views/assets/app-[hash].js',
- dir: 'dist'
- }
- },
- chunkSizeWarningLimit: 2048
- }
- })
|