1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import { createHtmlPlugin } from 'vite-plugin-html' import { resolve } from 'path'
export default defineConfig({ plugins: [ react(), createHtmlPlugin({ minify: true, pages: [{ entry: 'src/pages//login/main.jsx', template: 'login.html', filename: 'login.html' }, { entry: 'src/pages//panel/main.jsx', template: 'panel.html', filename: 'panel.html' }, { entry: 'src/pages//index/main.jsx', template: 'index.html', filename: 'index.html' }, ] }) ], root: '.', build: { rollupOptions: { input: { index: 'index.html', login: 'login.html', panel: 'panel.html', }, output: { chunkFileNames: 'static/js/[name]-[hash].js', entryFileNames: 'static/js/[name]-[hash].js', assetFileNames: 'static/[ext]/[name]-[hash].[ext]', } }, } })
|