Angular Create a CLI assembly, place duplicates of all my fonts in the root of my dist directory. Can this be avoided?
In my Angular project, I have custom fonts stored in src / assets / fonts / *
I refer to these fonts in the styles.scss file as follows:
@font-face {
font-family: 'museo_sans_package';
src: url('assets/fonts/MuseoSans_100-webfont.eot');
...
When building an assembly using Angular CLI, my font directory along with all the font files in it is copied correctly to my directory. / dist:
./distance/active/fonts/*
however all my font files are also duplicated to the root of my / dist directory and also results in 2 copies of my fonts. Alone in. / dist / assets / fonts / * as expected and also in. / dist / * which I don't want.
Is there some configuration I need to set to avoid this?
UPDATE: fonts are copied to directory. / dist / assets / fonts because the .angular-cli.json config is set to dup in the dist directory.
Duplication of my font in the root directory .dist caused either by the compiler sass, or wmwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwmwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww assembly process by modifying them to point to the root, not the relative path / fonts attributes / *
my current Angular install:
@angular/cli: 1.1.0
node: 8.0.0
os: darwin x64
@angular/animations: 4.1.3
@angular/common: 4.1.3
@angular/compiler: 4.1.3
@angular/core: 4.1.3
@angular/forms: 4.1.3
@angular/http: 4.1.3
@angular/platform-browser: 4.1.3
@angular/platform-browser-dynamic: 4.1.3
@angular/router: 4.1.3
@angular/cli: 1.1.0
@angular/compiler-cli: 4.1.3
@angular/language-service: 4.1.3
source to share
I think you will find this answer helpful.
Github Angular CLI issue: Angular CLI duplicates resources in root directory
source to share