mo 1 year ago
parent
commit
d2fdab4eca
1 changed files with 12 additions and 1 deletions
  1. 12 1
      vite.config.ts

+ 12 - 1
vite.config.ts

@@ -26,6 +26,7 @@ function resolve(dir: string) {
 // const proxyUrl = 'https://dev.kt.colexiu.com/';
 const proxyUrl = 'https://test.lexiaoya.cn';
 const now = new Date().getTime();
+const sign = `e/${now}`;
 export default defineConfig(() => {
   return {
     base: './',
@@ -136,7 +137,17 @@ export default defineConfig(() => {
       __APP_VERSION__: now
     },
     build: {
-      target: 'es2015'
+      target: 'es2015',
+      rollupOptions: {
+        input: {
+          1: path.resolve(__dirname, './src/index.html')
+        },
+        output: {
+          entryFileNames: `${sign}/[name].js`,
+          chunkFileNames: `${sign}/[name].js`,
+          assetFileNames: `${sign}/[name].[ext]`
+        }
+      }
     },
     resolve: {
       alias: {