Skip to content

Commit

Permalink
perf: 将变量导出为单个字符
Browse files Browse the repository at this point in the history
对于 Windows Up-to-Date 这样以外来依赖为主、变量和运算较少的项目而言,通过这种方法
带来的代码体积层面上的优化只是细微提升而已。然而还是按照文档将 `build.rollupOptions.
output.minifyInternalExports 改为了 true 以应用此优化,能省一点是一点(划掉

Signed-off-by: crrashh1542 <[email protected]>
  • Loading branch information
crrashh1542 committed Jun 8, 2024
1 parent fa05cb8 commit dfbd718
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default defineConfig({
assetFileNames: '_wu/assets/[name].[hash].[ext]',
chunkFileNames: '_wu/[name].[hash].js',
entryFileNames: '_wu/[name].[hash].js',
minifyInternalExports: true,
manualChunks(id) {
if(id.includes('@vue/runtime-core')) {
return 'vendors/vue-runtime'
Expand Down

0 comments on commit dfbd718

Please sign in to comment.