| 1234567891011121314151617181920212223 |
- import { defineConfig } from 'vite'
- import uni from '@dcloudio/vite-plugin-uni'
- export default defineConfig({
- plugins: [
- uni(),
- ],
- build: {
- target: 'es2015',
- // 添加时间戳到文件名,强制浏览器重新加载
- rollupOptions: {
- output: {
- entryFileNames: `assets/[name]-[hash]-${Date.now()}.js`,
- chunkFileNames: `assets/[name]-[hash]-${Date.now()}.js`,
- assetFileNames: `assets/[name]-[hash]-${Date.now()}.[ext]`
- }
- }
- },
- server: {
- host: '0.0.0.0',
- port: 8080
- }
- })
|