I dont think this is documented at all.
Took me days of googling/try-failing only to find answer minutes after posting the question.
npm run prerender
executes:
"prerender": {
"builder": "@nguniversal/builders:prerender",
"options": {
"browserTarget": "offer:build:prod",
"serverTarget": "offer:server:prod",
"routes": [
"/"
]
},
"configurations": {
"prod": {}
}
}
I needed to to add "localize": ["en", "de"]
option to server
and browser
build config
Server:
"server": {
"builder": "@angular-devkit/build-angular:server",
"options": {
"outputPath": "dist/offer/server",
"main": "projects/offer/server.ts",
"tsConfig": "projects/offer/tsconfig.server.json",
"localize": ["en", "de"]
},
"configurations": {
"prod": {
"sourceMap": false,
"optimization": true
}
}
}
Client:
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/offer/browser",
"index": "projects/offer/src/index.html",
"main": "projects/offer/src/main.ts",
"polyfills": "projects/offer/src/polyfills.ts",
"tsConfig": "projects/offer/tsconfig.app.json",
"localize": ["en", "de"],
"aot": true,
"extractCss": true,
"preserveSymlinks": true,
"stylePreprocessorOptions": {
"includePaths": [
"projects/offer/src"
]
}... etc
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…