Browse Source
chore(build): keep same hash for the same files (#3878)
* fix: state mutations in computed getters should be avoided
* fix: type about getDataSourceRef
* chore(build): keep same hash for the same files
pull/3885/head
xachary
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
3 additions and
3 deletions
-
internal/vite-config/src/config/application.ts
|
|
@ -36,7 +36,7 @@ function defineApplicationConfig(defineOptions: DefineOptions = {}) { |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
const pathResolve = (pathname: string) => resolve(root, '.', pathname); |
|
|
const pathResolve = (pathname: string) => resolve(root, '.', pathname); |
|
|
const timestamp = new Date().getTime(); |
|
|
|
|
|
const applicationConfig: UserConfig = { |
|
|
const applicationConfig: UserConfig = { |
|
|
base: VITE_PUBLIC_PATH, |
|
|
base: VITE_PUBLIC_PATH, |
|
|
resolve: { |
|
|
resolve: { |
|
|
@ -63,8 +63,8 @@ function defineApplicationConfig(defineOptions: DefineOptions = {}) { |
|
|
cssTarget: 'chrome80', |
|
|
cssTarget: 'chrome80', |
|
|
rollupOptions: { |
|
|
rollupOptions: { |
|
|
output: { |
|
|
output: { |
|
|
// 入口文件名
|
|
|
// 入口文件名(不能变,否则所有打包的 js hash 值全变了)
|
|
|
entryFileNames: `assets/entry/[name]-[hash]-${timestamp}.js`, |
|
|
entryFileNames: 'index.js', |
|
|
manualChunks: { |
|
|
manualChunks: { |
|
|
vue: ['vue', 'pinia', 'vue-router'], |
|
|
vue: ['vue', 'pinia', 'vue-router'], |
|
|
antd: ['ant-design-vue', '@ant-design/icons-vue'], |
|
|
antd: ['ant-design-vue', '@ant-design/icons-vue'], |
|
|
|