Where else can I declare included scripts in angular-cli?

后端 未结 1 627
有刺的猬
有刺的猬 2021-01-25 09:44

In angular-cli.json I have:

\"polyfills\": \"polyfills.ts\"
\"scripts\": [\"script1.ts\"]

I want to add another another polyfill s

相关标签:
1条回答
  • 2021-01-25 10:25

    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}
    ],
    

    When you specify "lazy": true cli will create a separate file that will contain just your module you want to load conditionally.

    0 讨论(0)
提交回复
热议问题