Serve the source locale (nl) at / instead of /nl/: angular.json sourceLocale is now
{ code: 'nl', subPath: '' } → nl output at browser/ root (base href /), en stays /en/.
Rework localeLinks (nl → bare path, en → /en/…) + spec, and serve-i18n.mjs (nl assets at
root, en under /en/, / serves the nl index). And build the docker demo (+ serve:i18n) with
`--configuration development --localize` so isDevMode() stays true and the dev `⚙ state`
panel + role/scenario switchers render in the localized compose demo (they were correctly
gated off in the previous production build). Verified: nl base href /, en /en/, ngDevMode present.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
135 lines
3.8 KiB
JSON
135 lines
3.8 KiB
JSON
{
|
|
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
"version": 1,
|
|
"cli": {
|
|
"packageManager": "npm",
|
|
"analytics": false
|
|
},
|
|
"newProjectRoot": "projects",
|
|
"projects": {
|
|
"atomic-design-poc": {
|
|
"projectType": "application",
|
|
"schematics": {
|
|
"@schematics/angular:component": {
|
|
"style": "scss"
|
|
}
|
|
},
|
|
"root": "",
|
|
"sourceRoot": "src",
|
|
"prefix": "app",
|
|
"i18n": {
|
|
"sourceLocale": { "code": "nl", "subPath": "" },
|
|
"locales": {
|
|
"en": {
|
|
"translation": "src/locale/messages.en.xlf"
|
|
}
|
|
}
|
|
},
|
|
"architect": {
|
|
"build": {
|
|
"builder": "@angular/build:application",
|
|
"options": {
|
|
"browser": "src/main.ts",
|
|
"tsConfig": "tsconfig.app.json",
|
|
"inlineStyleLanguage": "scss",
|
|
"assets": [
|
|
{
|
|
"glob": "**/*",
|
|
"input": "public"
|
|
}
|
|
],
|
|
"styles": ["src/styles.scss"],
|
|
"polyfills": ["@angular/localize/init"],
|
|
"i18nMissingTranslation": "error"
|
|
},
|
|
"configurations": {
|
|
"production": {
|
|
"budgets": [
|
|
{
|
|
"type": "initial",
|
|
"maximumWarning": "1.5MB",
|
|
"maximumError": "2MB"
|
|
},
|
|
{
|
|
"type": "anyComponentStyle",
|
|
"maximumWarning": "4kB",
|
|
"maximumError": "8kB"
|
|
}
|
|
],
|
|
"outputHashing": "all",
|
|
"fileReplacements": [
|
|
{
|
|
"replace": "src/environments/environment.ts",
|
|
"with": "src/environments/environment.prod.ts"
|
|
}
|
|
]
|
|
},
|
|
"development": {
|
|
"optimization": false,
|
|
"extractLicenses": false,
|
|
"sourceMap": true
|
|
},
|
|
"en": {
|
|
"localize": ["en"]
|
|
}
|
|
},
|
|
"defaultConfiguration": "production"
|
|
},
|
|
"serve": {
|
|
"builder": "@angular/build:dev-server",
|
|
"configurations": {
|
|
"production": {
|
|
"buildTarget": "atomic-design-poc:build:production"
|
|
},
|
|
"development": {
|
|
"buildTarget": "atomic-design-poc:build:development"
|
|
},
|
|
"en": {
|
|
"buildTarget": "atomic-design-poc:build:development,en"
|
|
}
|
|
},
|
|
"defaultConfiguration": "development"
|
|
},
|
|
"test": {
|
|
"builder": "@angular/build:unit-test",
|
|
"configurations": {
|
|
"coverage": {
|
|
"coverage": true,
|
|
"coverageReporters": ["text-summary", "html", "lcov"],
|
|
"coverageExclude": [
|
|
"**/*.spec.ts",
|
|
"**/*.stories.ts",
|
|
"**/contracts/**",
|
|
"src/app/shared/infrastructure/api-client.ts",
|
|
"src/main.ts",
|
|
"src/test-setup.ts",
|
|
"**/*.d.ts"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"storybook": {
|
|
"builder": "@storybook/angular:start-storybook",
|
|
"options": {
|
|
"configDir": ".storybook",
|
|
"browserTarget": "atomic-design-poc:build",
|
|
"compodoc": true,
|
|
"compodocArgs": ["-e", "json", "-d", "."],
|
|
"port": 6006
|
|
}
|
|
},
|
|
"build-storybook": {
|
|
"builder": "@storybook/angular:build-storybook",
|
|
"options": {
|
|
"configDir": ".storybook",
|
|
"browserTarget": "atomic-design-poc:build",
|
|
"compodoc": true,
|
|
"compodocArgs": ["-e", "json", "-d", "."],
|
|
"outputDir": "storybook-static"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|