Replace variables on pre-rendered pages
JeffreyArt1 opened this issue · 4 comments
JeffreyArt1 commented
I'm using angular 17.0.3
and @ngx-env/builder 17.0.1-alpha.0
My angular.json
looks something like this:
{
"architect": {
"build": {
"builder": "@ngx-env/builder:application",
"options": {
"server": "src/main.server.ts",
"prerender": {
"routesFile": "routes.txt"
},
"ssr": {
"entry": "server.ts"
}
}
}
}
}
After build, i get this error:
URIError: Failed to decode param '/%NG_APP_CDN_URL%/resources/brand/favicon'
at decodeURIComponent (<anonymous>)
at Xy (file:///<dist-dir>/server/server.mjs:74:4297)
at In.match (file:///<dist-dir>/server/server.mjs:74:4169)
at tO (file:///<dist-dir>/server/server.mjs:74:10738)
at v (file:///<dist-dir>/server/server.mjs:74:8145)
at jf (file:///<dist-dir>/server/server.mjs:113:6080)
at In.handle_request (file:///<dist-dir>/server/server.mjs:74:3780)
at x (file:///<dist-dir>/server/server.mjs:74:8906)
at file:///<dist-dir>/server/server.mjs:74:8500
at Nr.process_params (file:///<dist-dir>/server/server.mjs:74:9022)
I noticed that in the dist/<app-name>/browser/<prerendered-page>
directories, the index.html
files weren't transformed.
chihab commented
The issue has been fixed on 17.0.2-alpha.0, could you please confirm?
JeffreyArt1 commented
It's fixed now.
JeffreyArt1 commented
Noticed that building on dev mode also causes the error.
ng build -c development
chihab commented
Could you copy paste the whole output?