Skip to content

如何提高 injectScript 的编译速度

InjectSciprt 的编译速度由 *.entry.ts 中所引用的包的大小和本身的逻辑文件大小决定,要想达到低于 20ms 的编译速度,我们应该尽量将外部引用的包,比如 react, antd 等写到 externals 里面,这样 InjectScript 就只编译我们的逻辑代码,因此速度会非常快。

Powered by Vitepress