-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
baseHref/deployUrl option for universal build in @angular-devkit/build-angular:server #12093
Comments
Hey. |
Hi, for the server builds, there is no When the application gets served by the server, the CSS gets inlined in the index.html and any relative paths for CSS resources will use the baseHref previously used in the client build. Also, you could use the If the problem persists, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior. |
Hey, @alan-agius4 Can you please tell, where does this
but it gives me this error
|
Me too wants to know this |
Hi, "server": {
"builder": "@angular-devkit/build-angular:server",
"options": {
"deployUrl": "https://cdn.com"
...
},
...
},
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"deployUrl": "https://cdn.com"
...
},
...
} It can also be a nested property inside a configuration example "build": {
"builder": "@angular-devkit/build-angular:browser",
"configurations": {
"production": {
"deployUrl": "https://cdn.com"
...
}
...
},
...
} |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
From @nishesj on May 30, 2018 9:1
Bug Report or Feature Request (mark with an
x
)Area
Versions
angular-devkit/architect 0.6.5
Repro steps
Cannot pass baseHref or deployUrl option when running
ng run web:server:production
which contains
Which causes wrong assets path in css on the universal generated response.
Where as when doing a browser build the baseHref is properly appended in postCss processing as expected.
baseHref set to "https://cdn.example.com"
angular-devkit/build-angular:browser-> postCss ->
angular-devkit/build-angular:server -> postCss -> no change which leads to wrong URL in first initial server rendered response in combination to html base href tag
Desired functionality
The postcss step in server build should append the path with baseUrl or deployUrl as in browserBuild
so that the initial response generated by universal has correct path to assets if relative URL is used
Copied from original issue: angular/devkit#986
The text was updated successfully, but these errors were encountered: