I am currently migrating my old project based on JHipster into new version - JHipster 6, where is used Angular 8.
I have problem with angular.json
file. After generating new project, this file looks like that:
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"panel": {
"root": "",
"sourceRoot": "src/main/webapp",
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"skipTests": true,
"style": "scss"
},
"@schematics/angular:directive": {
"skipTests": true
},
"@schematics/angular:guard": {
"skipTests": true
},
"@schematics/angular:pipe": {
"skipTests": true
},
"@schematics/angular:service": {
"skipTests": true
}
},
"prefix": "jhi",
"architect": {}
}
},
"defaultProject": "panel",
"cli": {
"packageManager": "npm"
}
}
There is no place to add new scripts or styles, so I added content of architect
.
"architect": {
"build": {
"options": {
"outputPath": "target/www/app",
"scripts": [
"node_modules/@fullcalendar/core/main.min.js"
]
}
}
}
I was trying three different ways of path ( "node_modules"
, "../note_modules"
and "./node_modules"
). Without success. Script was not imported into application. I think that is conected with JHipster structure.
Any ideas how to add external JS scripts like fullcalendar or jquery?