1

I have moved to the newest version of angular cli that uses webpack. I have trouble finding out how to actually force the compiler to add custom font files to the dist folder so I can use them in my application.
I tried with additionalEntries in angular-cli.json but it doesn't work.

{
"project": {
"version": "1.0.0-beta.11-webpack.2",
"name": "print-dashboard"
},
"apps": [
{
  "main": "src/main.ts",
  "tsconfig": "src/tsconfig.json",
  "mobile": false,
  "additionalEntries": [
    "assets/font-awesome/fonts/**"
  ]
}
],
  "addons": [],
  "packages": [],
  "e2e": {
  "protractor": {
  "config": "config/protractor.conf.js"
  }
},
  "test": {
  "karma": {
  "config": "config/karma.conf.js"
  }
 },
  "defaults": {
  "prefix": "app",
  "sourceDir": "src",
  "styleExt": "scss",
  "prefixInterfaces": false,
  "lazyRoutePrefix": "+"
  }
}
MatWaligora
  • 1,207
  • 1
  • 12
  • 15

2 Answers2

2

Put any "extra" files (like folders for images, fonts etc) in the /public folder and they will be incorporated into your build automatically

brando
  • 8,215
  • 8
  • 40
  • 59
0

with angular-cli: 1.0.0-beta.11-webpack.8 you can use css imports (see https://stackoverflow.com/a/39238788/1787388)

Community
  • 1
  • 1
shusson
  • 5,542
  • 34
  • 38