From fbdbfd5db7cb64f46bb4851b077fa8190e488a5d Mon Sep 17 00:00:00 2001 From: ychung-mot Date: Thu, 4 Apr 2024 10:40:23 -0700 Subject: [PATCH] chore: Disable Inline Critical CSS --- frontend/angular.json | 195 +++++++++++++++++----------------- frontend/docker-entrypoint.sh | 6 +- frontend/nginx.local.conf | 2 +- 3 files changed, 101 insertions(+), 102 deletions(-) diff --git a/frontend/angular.json b/frontend/angular.json index 315290c8..632c48f1 100644 --- a/frontend/angular.json +++ b/frontend/angular.json @@ -1,104 +1,107 @@ { - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "version": 1, - "newProjectRoot": "projects", - "projects": { - "CodeChallengeBC": { - "projectType": "application", - "schematics": { - "@schematics/angular:component": { - "style": "scss" - } - }, - "root": "", - "sourceRoot": "src", - "prefix": "app", - "architect": { - "build": { - "builder": "@angular-devkit/build-angular:application", - "options": { - "outputPath": "dist/frontend", - "index": "src/index.html", - "browser": "src/main.ts", - "polyfills": ["zone.js"], - "tsConfig": "tsconfig.app.json", - "inlineStyleLanguage": "scss", - "assets": ["src/favicon.ico", "src/assets"], - "styles": [ - "src/styles.scss", - "node_modules/primeng/resources/themes/lara-light-blue/theme.css", - "node_modules/primeng/resources/primeng.min.css", - "node_modules/ol/ol.css" - ], - "scripts": [] - }, - "configurations": { - "production": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "1500kb", - "maximumError": "3mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "6kb", - "maximumError": "12kb" + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "CodeChallengeBC": { + "projectType": "application", + "schematics": { + "@schematics/angular:component": { + "style": "scss" } - ], - "outputHashing": "all" }, - "development": { - "optimization": false, - "extractLicenses": false, - "sourceMap": true, - "fileReplacements": [ - { - "replace": "src/environments/environment.ts", - "with": "src/environments/environment.development.ts" + "root": "", + "sourceRoot": "src", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:application", + "options": { + "outputPath": "dist/frontend", + "index": "src/index.html", + "browser": "src/main.ts", + "polyfills": ["zone.js"], + "tsConfig": "tsconfig.app.json", + "inlineStyleLanguage": "scss", + "assets": ["src/favicon.ico", "src/assets"], + "styles": ["src/styles.scss"], + "scripts": [] + }, + "configurations": { + "production": { + "optimization": { + "scripts": true, + "styles": { + "minify": true, + "inlineCritical": false + }, + "fonts": false + }, + "budgets": [ + { + "type": "initial", + "maximumWarning": "1500kb", + "maximumError": "3mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "6kb", + "maximumError": "12kb" + } + ], + "outputHashing": "all" + }, + "development": { + "optimization": false, + "extractLicenses": false, + "sourceMap": true, + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.development.ts" + } + ] + } + }, + "defaultConfiguration": "production" + }, + "serve": { + "options": { + "host": "127.0.0.1", + "port": 4200 + }, + "builder": "@angular-devkit/build-angular:dev-server", + "configurations": { + "production": { + "buildTarget": "CodeChallengeBC:build:production" + }, + "development": { + "buildTarget": "CodeChallengeBC:build:development" + } + }, + "defaultConfiguration": "development" + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "buildTarget": "CodeChallengeBC:build" + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "polyfills": ["zone.js", "zone.js/testing"], + "tsConfig": "tsconfig.spec.json", + "inlineStyleLanguage": "scss", + "assets": ["src/favicon.ico", "src/assets"], + "styles": ["src/styles.scss"], + "scripts": [] + } } - ] - } - }, - "defaultConfiguration": "production" - }, - "serve": { - "options": { - "host": "127.0.0.1", - "port": 4200 - }, - "builder": "@angular-devkit/build-angular:dev-server", - "configurations": { - "production": { - "buildTarget": "CodeChallengeBC:build:production" - }, - "development": { - "buildTarget": "CodeChallengeBC:build:development" } - }, - "defaultConfiguration": "development" - }, - "extract-i18n": { - "builder": "@angular-devkit/build-angular:extract-i18n", - "options": { - "buildTarget": "CodeChallengeBC:build" - } - }, - "test": { - "builder": "@angular-devkit/build-angular:karma", - "options": { - "polyfills": ["zone.js", "zone.js/testing"], - "tsConfig": "tsconfig.spec.json", - "inlineStyleLanguage": "scss", - "assets": ["src/favicon.ico", "src/assets"], - "styles": ["src/styles.scss"], - "scripts": [] - } } - } + }, + "cli": { + "analytics": "8aee1487-a9f6-4d92-828d-594afe2a7ed6" } - }, - "cli": { - "analytics": "8aee1487-a9f6-4d92-828d-594afe2a7ed6" - } } diff --git a/frontend/docker-entrypoint.sh b/frontend/docker-entrypoint.sh index 7add8cf8..e0b05edf 100644 --- a/frontend/docker-entrypoint.sh +++ b/frontend/docker-entrypoint.sh @@ -10,11 +10,7 @@ cat >/nginx/nginx.conf <