With modified deploy-url, inlining critical css not working for downloaded roboto font
See original GitHub issue🐞 With modified deploy-url, inlining critical css not working for downloaded roboto font
Command (mark with an x
)
- new
- build
- serve
- test
- e2e
- generate
- add
- update
- lint
- extract-i18n
- run
- config
- help
- version
- doc
Is this a regression?
No.
In v12 also, was not working.
Description
A clear and concise description of the problem...🔬 Minimal Reproduction
With modified deploy-url, inlining critical css not working for downloaded roboto font
package.json
"scripts": {
...
"build": "node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng build --base-href=/portal/ --deploy-url=/portal/public/ --configuration production"
...
}
font.css
@font-face {
font-family: 'Roboto';
src: url('Roboto-Light.woff2') format('woff2'),
url('Roboto-Light.woff') format('woff');
font-weight: 300;
font-style: normal;
font-display: swap;
}
angular.json projects.<project-name>.architect.build:
...
"styles": [
...
"src/assets/fonts/font.css",
...
],
...
"configurations": {
"production": {
....
"optimization": {
"scripts": true,
"styles": {
"minify": true,
"inlineCritical": true
}
}
....
}
...
}
🔥 Exception or Error
the path is http://localhost:8080/portal/Roboto-Light.86fc2559ff73eac5.woff2 instead of http://localhost:8080/portal/public/Roboto-Light.86fc2559ff73eac5.woff2
🌍 Your Environment
13.0.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:19
Top Results From Across the Web
How to fix problem with Roboto font load in Google Chrome?
The code constructed in this way is to load the fonts at the same time as the page renders, the last code cell...
Read more >Angular Application In Custom Url Path With Serviceworker - ADocLib
With modified deployurl inlining critical css not working for downloaded roboto font comp: #12322 by naveedahmed1 was closed on Aug 10 2021.
Read more >Untitled
Highschool dxd barakiel, Tiziano ferro perdona download, Tamir tadilat izle! ... Store app not working windows 8.1, Strong electroweak matter, ...
Read more >Cree Una Aplicación Sin Servidor De Tres Niveles - Morioh
A diferencia de la aplicación CDK v1, no necesita instalar ningún paquete ... Cree un nuevo directorio llamado web en lib y agregue...
Read more >material-theme | lightweight jekyll blog theme | Theme library
Implement material-theme with how-to, Q&A, fixes, code snippets. kandi ratings - Low support, 6 Bugs, No Vulnerabilities. Permissive License, Build not ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@alan-agius4 @school-coder I think I have made it work as desired too (The interceptor is indeed really needed, and injecting the
APP_BASE_HREF
was a good idea!), thanks both for your valuable feedback.I suspect this will pop again and again on this tracker once
deployUrl
is removed, because devs are lazy by design, and a deprecation warning is something our eyes ignore until the feature is definitely removed 😃Once again, thanks ! And keep-up the good work angular team, you do an awesome job!
The CSP issue is a known limitation which is being tracked here: https://github.com/angular/angular-cli/issues/20864