Browse Source

chore: improve build file naming convention and caching (#3908)

* fix: improve build file naming convention

* remove js to the entryFileName path

* replace dot to hyphen
No name 9 months ago
parent
commit
71c4edad63
1 changed files with 2 additions and 2 deletions
  1. 2 2
      internal/vite-config/src/config/application.ts

+ 2 - 2
internal/vite-config/src/config/application.ts

@@ -63,8 +63,8 @@ function defineApplicationConfig(defineOptions: DefineOptions = {}) {
         cssTarget: 'chrome80',
         rollupOptions: {
           output: {
-            // 入口文件名(不能变,否则所有打包的 js hash 值全变了)
-            entryFileNames: 'index.js',
+            // 入口文件名
+            entryFileNames: 'assets/entry/[name]-[hash].js',
             manualChunks: {
               vue: ['vue', 'pinia', 'vue-router'],
               antd: ['ant-design-vue', '@ant-design/icons-vue'],