更新时间:2023-09-30 10:27:28
如果您希望 cli 在单独的包中输出脚本,您可以使用 global-scripts 像:
If you want cli to output the script in a separate bundle you can use global-scripts like:
"scripts": [
{ "input": "../node_modules/module-name", "output": "module-custom-name", "lazy": true}
],
当您指定 "lazy": true
cli 将创建一个单独的文件,该文件将仅包含您要有条件加载的模块.
When you specify "lazy": true
cli will create a separate file that will contain just your module you want to load conditionally.