Reputation: 6852
I am trying to update my project with 11 version of angular, only problem I have that i got some error on compile, I am using css from node_modules to inject in my solution, like this in angular.json
"styles": [
"src/styles.scss",
{
"inject": false,
"input": "./node_modules/some-library/lib/styles/themes/dark/main.scss",
"bundleName": "assets/dark"
},
{
"inject": false,
"input": "./node_modules/some-library/lib/lib/styles/themes/default/main.scss",
"bundleName": "assets/default"
}
]
But when I try to compile i got error like this
Schema validation failed with the following errors: Data path ".styles[1].bundleName" should match pattern "^[\w-.]*$". Data path ".styles[1]" should be string. Data path ".styles[1]" should match exactly one schema in oneOf.
I think problem is with "inject": false, but I dont know where I am making mistake, thanks in advance
Upvotes: 4
Views: 1860
Reputation: 1149
The bundleName property may not includes "/" anymore...
To check if your bundle name is acceptable just run /^[\w\-.]*$/.test("assets-dark")
, say from the browser console.
Upvotes: 4