JavaScript/vite/组件构建:修订间差异
来自康健生活
| 第103行: | 第103行: | ||
</syntaxhighlight>}} | </syntaxhighlight>}} | ||
== 单文件编译 == | |||
== tree shaking == | == tree shaking == | ||
在多组件或多文件的库中,保持此库支持 tree shaking 需要在 package.json 中设置 sideEffects。 | 在多组件或多文件的库中,保持此库支持 tree shaking 需要在 package.json 中设置 sideEffects。 | ||