Closed
Description
Angular app with the latest angular-cli gets assets (fonts and images) from the parent directory of the component. However as far as I understand from the configuration it should refer to the root path of the application.
The version and the angular.json file contents you may find below.
Versions
angular-cli 6.0.0-rc.5
@angular/compiler-cli@5.2.5
typescript 2.9.0-dev.20180414
node.js 8.11.1
Repro steps
Part of the angular.json file:
"$schema": "./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"abp-zero-template": {
"root": "",
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.json",
"polyfills": "src/polyfills.ts",
"assets": [
{
"glob": "**/*",
"input": "src/assets",
"output": "/assets"
},
{
"glob": "favicon.ico",
"input": "src",
"output": "/"
},
{
"glob": "abp.signalr.js",
"input": "node_modules/abp-web-resources/Abp/Framework/scripts/libs",
"output": "/assets/abp"
},
{
"glob": "**.*",
"input": "node_modules/bootstrap-select/dist/js/i18n",
"output": "/assets/localization/bootstrap-select"
},
{
"glob": "**.*",
"input": "node_modules/timeago/locales",
"output": "/assets/localization/jquery-timeago"
}
]...
Observed behavior
Error 404 not found.
Desired behavior
As far as I understand the app should always look for the fonts and images using root path like:
http://domain.name/font.wff
instead of
http://domain.name/app/parent-folder-of-the-component-which-uses-this-font/font.wff.
Otherwise I will be forced to have dozens of assets duplicates across the app.
Just rolled back to angular-cli 1.7.4 and everything works fine.
Metadata
Metadata
Assignees
Labels
No labels