How to include assets from node_modules in angular cli project

后端 未结 3 924
南笙
南笙 2020-12-05 09:15

How to include assets from external library into Angular CLI project

I am trying below but this does not work,

  \"assets\": [
    \"../node_modules/         


        
3条回答
  •  感情败类
    2020-12-05 09:59

    Since angular 6 the config has changed slightly. To achieve this now, change the assets property of the respective builder in angular.json (beware, there are at least two relevant builders in the architects build and test!)

    "assets": [
      "src/favicon.ico",
      "src/assets",
      {
        "glob": "**/*",
        "input": "./node_modules//",
        "output": "./assets/"
      },
    

提交回复
热议问题