|
7 | 7 | "i18n": { |
8 | 8 | "locales": { |
9 | 9 | "en": { |
10 | | - "translation": "src/i18n/messages.en.xlf", |
| 10 | + "translation": "src/i18n/messages.xlf", |
11 | 11 | "baseHref": "/" |
12 | 12 | }, |
13 | 13 | "es": "src/i18n/messages.es.xlf" |
|
26 | 26 | "build": { |
27 | 27 | "builder": "@angular-devkit/build-angular:browser", |
28 | 28 | "options": { |
| 29 | + "outputPath": "dist/browser/en/", |
29 | 30 | "index": "src/index.html", |
30 | 31 | "main": "src/main.browser.ts", |
31 | 32 | "polyfills": "src/polyfills.ts", |
32 | | - "tsConfig": "tsconfig.app.json", |
33 | | - "aot": true, |
| 33 | + "tsConfig": "tsconfig.browser.json", |
| 34 | + "assets": [ |
| 35 | + { |
| 36 | + "glob": "**/*", |
| 37 | + "input": "src/assets/", |
| 38 | + "output": "/assets/", |
| 39 | + "ignore": [ |
| 40 | + "base/*", |
| 41 | + "css/*", |
| 42 | + "js/*" |
| 43 | + ] |
| 44 | + }, |
| 45 | + { |
| 46 | + "glob": "**/*", |
| 47 | + "input": "src/assets/base", |
| 48 | + "output": "/" |
| 49 | + } |
| 50 | + ], |
34 | 51 | "styles": [ |
35 | 52 | "node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css", |
36 | 53 | "src/assets/css/reset.css", |
|
47 | 64 | "src/assets/js/modernizr.js" |
48 | 65 | ], |
49 | 66 | "serviceWorker": true, |
50 | | - "ngswConfigPath": "src/ngsw-config.json" |
| 67 | + "ngswConfigPath": "src/ngsw-config.json", |
| 68 | + "budgets": [ |
| 69 | + { |
| 70 | + "type": "anyComponentStyle", |
| 71 | + "maximumWarning": "6kb" |
| 72 | + }, |
| 73 | + { |
| 74 | + "type": "initial", |
| 75 | + "maximumWarning": "2mb", |
| 76 | + "maximumError": "5mb" |
| 77 | + } |
| 78 | + ] |
51 | 79 | }, |
52 | 80 | "configurations": { |
53 | | - "en": { |
54 | | - "budgets": [ |
55 | | - { |
56 | | - "type": "anyComponentStyle", |
57 | | - "maximumWarning": "6kb" |
58 | | - } |
59 | | - ], |
60 | | - "outputPath": "dist/browser/", |
61 | | - "i18nFile": "src/i18n/messages.en.xlf", |
62 | | - "i18nLocale": "en", |
63 | | - "i18nMissingTranslation": "error", |
64 | | - "assets": [ |
65 | | - { |
66 | | - "glob": "**/*", |
67 | | - "input": "src/assets/", |
68 | | - "output": "/assets/", |
69 | | - "ignore": [ |
70 | | - "base/*", |
71 | | - "css/*", |
72 | | - "js/*" |
73 | | - ] |
74 | | - }, |
75 | | - { |
76 | | - "glob": "**/*", |
77 | | - "input": "src/assets/base", |
78 | | - "output": "/" |
79 | | - } |
80 | | - ] |
81 | | - }, |
82 | | - "es": { |
83 | | - "budgets": [ |
84 | | - { |
85 | | - "type": "anyComponentStyle", |
86 | | - "maximumWarning": "6kb" |
87 | | - } |
88 | | - ], |
89 | | - "localize": [ |
90 | | - "es" |
91 | | - ], |
92 | | - "outputPath": "dist/browser", |
93 | | - "i18nMissingTranslation": "error", |
94 | | - "assets": [ |
95 | | - { |
96 | | - "glob": "**/*", |
97 | | - "input": "src/assets/", |
98 | | - "output": "/assets/", |
99 | | - "ignore": [ |
100 | | - "base/*", |
101 | | - "css/*", |
102 | | - "js/*" |
103 | | - ] |
104 | | - }, |
105 | | - { |
106 | | - "glob": "**/*", |
107 | | - "input": "src/assets/base", |
108 | | - "output": "/" |
109 | | - } |
110 | | - ] |
111 | | - }, |
112 | | - "production-en": { |
113 | | - "assets": [ |
114 | | - { |
115 | | - "glob": "**/*", |
116 | | - "input": "src/assets/", |
117 | | - "output": "/assets/", |
118 | | - "ignore": [ |
119 | | - "base/*", |
120 | | - "css/*", |
121 | | - "js/*" |
122 | | - ] |
123 | | - }, |
124 | | - { |
125 | | - "glob": "**/*", |
126 | | - "input": "src/assets/base", |
127 | | - "output": "/" |
128 | | - } |
129 | | - ], |
| 81 | + "production": { |
130 | 82 | "fileReplacements": [ |
131 | 83 | { |
132 | 84 | "replace": "src/environments/environment.ts", |
|
138 | 90 | "sourceMap": false, |
139 | 91 | "extractCss": true, |
140 | 92 | "namedChunks": false, |
| 93 | + "aot": true, |
141 | 94 | "extractLicenses": true, |
142 | 95 | "vendorChunk": false, |
143 | | - "buildOptimizer": true, |
144 | | - "budgets": [ |
145 | | - { |
146 | | - "type": "anyComponentStyle", |
147 | | - "maximumWarning": "6kb" |
148 | | - } |
149 | | - ], |
150 | | - "outputPath": "dist/browser/", |
151 | | - "i18nFile": "src/i18n/messages.en.xlf", |
152 | | - "i18nLocale": "en", |
153 | | - "i18nMissingTranslation": "error" |
| 96 | + "buildOptimizer": true |
154 | 97 | }, |
155 | 98 | "production-es": { |
| 99 | + "baseHref": "/es/", |
156 | 100 | "fileReplacements": [ |
157 | 101 | { |
158 | 102 | "replace": "src/environments/environment.ts", |
159 | 103 | "with": "src/environments/environment.prod.ts" |
160 | 104 | } |
161 | 105 | ], |
162 | | - "localize": [ |
163 | | - "es" |
164 | | - ], |
165 | 106 | "optimization": true, |
166 | 107 | "outputHashing": "all", |
167 | 108 | "sourceMap": false, |
168 | 109 | "extractCss": true, |
169 | 110 | "namedChunks": false, |
| 111 | + "aot": true, |
170 | 112 | "extractLicenses": true, |
171 | 113 | "vendorChunk": false, |
172 | 114 | "buildOptimizer": true, |
173 | | - "budgets": [ |
174 | | - { |
175 | | - "type": "anyComponentStyle", |
176 | | - "maximumWarning": "6kb" |
177 | | - } |
178 | | - ], |
179 | | - "outputPath": "dist/browser", |
| 115 | + "outputPath": "dist/browser/es/", |
| 116 | + "i18nFile": "src/locale/messages.es.xlf", |
| 117 | + "i18nFormat": "xlf", |
| 118 | + "i18nLocale": "es", |
| 119 | + "i18nMissingTranslation": "error" |
| 120 | + }, |
| 121 | + "es": { |
| 122 | + "baseHref": "/es/", |
| 123 | + "aot": true, |
| 124 | + "outputPath": "dist/browser/es/", |
| 125 | + "i18nFile": "src/locale/messages.es.xlf", |
| 126 | + "i18nFormat": "xlf", |
| 127 | + "i18nLocale": "es", |
180 | 128 | "i18nMissingTranslation": "error" |
181 | 129 | } |
182 | 130 | } |
183 | 131 | }, |
184 | 132 | "serve": { |
185 | 133 | "builder": "@angular-devkit/build-angular:dev-server", |
186 | 134 | "options": { |
187 | | - "browserTarget": "angularexampleapp:build:en" |
| 135 | + "browserTarget": "angularexampleapp:build" |
188 | 136 | }, |
189 | 137 | "configurations": { |
190 | | - "en": { |
191 | | - "browserTarget": "angularexampleapp:build:en" |
| 138 | + "production": { |
| 139 | + "browserTarget": "angularexampleapp:build:production" |
192 | 140 | }, |
193 | 141 | "es": { |
194 | 142 | "browserTarget": "angularexampleapp:build:es" |
195 | 143 | } |
196 | 144 | } |
197 | 145 | }, |
| 146 | + "serve-ssr": { |
| 147 | + "builder": "@nguniversal/builders:ssr-dev-server", |
| 148 | + "options": { |
| 149 | + "browserTarget": "angularexampleapp:build", |
| 150 | + "serverTarget": "angularexampleapp:server" |
| 151 | + }, |
| 152 | + "configurations": { |
| 153 | + "production": { |
| 154 | + "browserTarget": "angularexampleapp:build:production", |
| 155 | + "serverTarget": "angularexampleapp:server:production" |
| 156 | + } |
| 157 | + } |
| 158 | + }, |
| 159 | + "server": { |
| 160 | + "builder": "@angular-devkit/build-angular:server", |
| 161 | + "options": { |
| 162 | + "outputPath": "dist/server", |
| 163 | + "main": "server.ts", |
| 164 | + "tsConfig": "./tsconfig.server.json", |
| 165 | + "stylePreprocessorOptions": { |
| 166 | + "includePaths": [ |
| 167 | + "src/styles" |
| 168 | + ] |
| 169 | + }, |
| 170 | + "externalDependencies": [ |
| 171 | + "@firebase/firestore" |
| 172 | + ] |
| 173 | + }, |
| 174 | + "configurations": { |
| 175 | + "production": { |
| 176 | + "optimization": true, |
| 177 | + "fileReplacements": [ |
| 178 | + { |
| 179 | + "replace": "src/environments/environment.ts", |
| 180 | + "with": "src/environments/environment.prod.ts" |
| 181 | + } |
| 182 | + ] |
| 183 | + } |
| 184 | + } |
| 185 | + }, |
198 | 186 | "extract-i18n": { |
199 | 187 | "builder": "@angular-devkit/build-angular:extract-i18n", |
200 | 188 | "options": { |
201 | 189 | "browserTarget": "angularexampleapp:build" |
202 | 190 | } |
203 | 191 | }, |
| 192 | + "xliffmerge": { |
| 193 | + "builder": "@ngx-i18nsupport/tooling:xliffmerge", |
| 194 | + "options": { |
| 195 | + "xliffmergeOptions": { |
| 196 | + "i18nFormat": "xlf", |
| 197 | + "srcDir": "src/i18n", |
| 198 | + "genDir": "src/i18n", |
| 199 | + "defaultLanguage": "en", |
| 200 | + "languages": [ |
| 201 | + "en", |
| 202 | + "es" |
| 203 | + ] |
| 204 | + } |
| 205 | + } |
| 206 | + }, |
204 | 207 | "test": { |
205 | 208 | "builder": "@angular-devkit/build-angular:karma", |
206 | 209 | "options": { |
|
233 | 236 | "builder": "@angular-devkit/build-angular:tslint", |
234 | 237 | "options": { |
235 | 238 | "tsConfig": [ |
236 | | - "tsconfig.app.json", |
| 239 | + "tsconfig.browser.json", |
237 | 240 | "tsconfig.spec.json", |
238 | 241 | "e2e/tsconfig.json" |
239 | 242 | ], |
|
242 | 245 | ] |
243 | 246 | } |
244 | 247 | }, |
245 | | - "server": { |
246 | | - "builder": "@angular-devkit/build-angular:server", |
247 | | - "options": { |
248 | | - "main": "src/main.server.ts", |
249 | | - "tsConfig": "tsconfig.server.json", |
250 | | - "stylePreprocessorOptions": { |
251 | | - "includePaths": [ |
252 | | - "src/app/shared/styles" |
253 | | - ] |
254 | | - } |
255 | | - }, |
256 | | - "configurations": { |
257 | | - "production-en": { |
258 | | - "optimization": true, |
259 | | - "outputPath": "dist/server/en", |
260 | | - "i18nFile": "src/i18n/messages.en.xlf", |
261 | | - "i18nFormat": "xlf", |
262 | | - "i18nLocale": "en", |
263 | | - "i18nMissingTranslation": "error", |
264 | | - "fileReplacements": [ |
265 | | - { |
266 | | - "replace": "src/environments/environment.ts", |
267 | | - "with": "src/environments/environment.prod.ts" |
268 | | - } |
269 | | - ] |
270 | | - }, |
271 | | - "production-es": { |
272 | | - "optimization": true, |
273 | | - "outputPath": "dist/server/es", |
274 | | - "i18nFile": "src/i18n/messages.es.xlf", |
275 | | - "i18nFormat": "xlf", |
276 | | - "i18nLocale": "es", |
277 | | - "i18nMissingTranslation": "error", |
278 | | - "fileReplacements": [ |
279 | | - { |
280 | | - "replace": "src/environments/environment.ts", |
281 | | - "with": "src/environments/environment.prod.ts" |
282 | | - } |
283 | | - ] |
284 | | - } |
285 | | - } |
286 | | - }, |
287 | | - "xliffmerge": { |
288 | | - "builder": "@ngx-i18nsupport/tooling:xliffmerge", |
289 | | - "options": { |
290 | | - "xliffmergeOptions": { |
291 | | - "i18nFormat": "xlf", |
292 | | - "srcDir": "src/i18n", |
293 | | - "genDir": "src/i18n", |
294 | | - "defaultLanguage": "en", |
295 | | - "languages": [ |
296 | | - "en", |
297 | | - "es" |
298 | | - ] |
299 | | - } |
300 | | - } |
301 | | - }, |
302 | 248 | "e2e": { |
303 | 249 | "builder": "@angular-devkit/build-angular:protractor", |
304 | 250 | "options": { |
|
310 | 256 | "devServerTarget": "angularexampleapp:serve:production" |
311 | 257 | } |
312 | 258 | } |
| 259 | + }, |
| 260 | + "prerender": { |
| 261 | + "builder": "@nguniversal/builders:prerender", |
| 262 | + "options": { |
| 263 | + "browserTarget": "angularexampleapp:build:production", |
| 264 | + "serverTarget": "angularexampleapp:server:production", |
| 265 | + "routes": [ |
| 266 | + "/" |
| 267 | + ] |
| 268 | + }, |
| 269 | + "configurations": { |
| 270 | + "production": {} |
| 271 | + } |
313 | 272 | } |
314 | 273 | } |
315 | 274 | }, |
|
0 commit comments