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