Skip to content

Commit

Permalink
perf: 加上element动态函数默认缓存
Browse files Browse the repository at this point in the history
  • Loading branch information
yuntian001 committed Sep 22, 2022
1 parent 09d3e59 commit 292de0a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,13 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => {
},
optimizeDeps: {
//因为项目中很多用到了自动引入和动态加载,所以vite首次扫描依赖项会扫描不全,这里强制扫描全局。
entries: ['./src/**/*.{ts,vue}'],
entries: ['./src/**/*.{ts,tsx,vue}'],
include: [
'element-plus/es/components/loading/style/css',
'element-plus/es/components/message/style/css',
'element-plus/es/components/message-box/style/css',
'element-plus/es/components/notification/style/css',
],
},
};
};

0 comments on commit 292de0a

Please sign in to comment.