diff --git a/.github/workflows/merge-frontend-ci.yml b/.github/workflows/merge-frontend-ci.yml index 542d722..f3540ae 100644 --- a/.github/workflows/merge-frontend-ci.yml +++ b/.github/workflows/merge-frontend-ci.yml @@ -30,7 +30,7 @@ jobs: run: npm ci - name: Build - run: npm run build:i18n + run: npm run build:prod unit-tests: name: Unit tests diff --git a/.github/workflows/pr-frontend-ci.yml b/.github/workflows/pr-frontend-ci.yml index ae216e8..28e18a2 100644 --- a/.github/workflows/pr-frontend-ci.yml +++ b/.github/workflows/pr-frontend-ci.yml @@ -27,7 +27,7 @@ jobs: run: npm ci - name: Build - run: npm run build:i18n + run: npm run build:prod lint-format: name: Lint & format diff --git a/.husky/pre-push b/.husky/pre-push index 8f0e994..bc86907 100644 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -4,6 +4,6 @@ set -e echo "Running pre-push checks for frontend..." -npm --prefix phishing-email-analyzer/frontend run build:i18n +npm --prefix phishing-email-analyzer/frontend run build:prod npm --prefix phishing-email-analyzer/frontend run format:check npm --prefix phishing-email-analyzer/frontend run lint \ No newline at end of file diff --git a/phishing-email-analyzer/frontend/angular.json b/phishing-email-analyzer/frontend/angular.json index 92c339b..af9e718 100644 --- a/phishing-email-analyzer/frontend/angular.json +++ b/phishing-email-analyzer/frontend/angular.json @@ -62,7 +62,8 @@ "maximumError": "8kB" } ], - "outputHashing": "all" + "outputHashing": "all", + "localize": true }, "development": { "optimization": false, @@ -107,22 +108,6 @@ "pl-dev": { "localize": ["pl"] }, - "i18n": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "550kB", - "maximumError": "1MB" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "4kB", - "maximumError": "8kB" - } - ], - "outputHashing": "all", - "localize": true - }, "i18n-dev": { "localize": true } diff --git a/phishing-email-analyzer/frontend/package.json b/phishing-email-analyzer/frontend/package.json index 76dfd23..d4e62fa 100644 --- a/phishing-email-analyzer/frontend/package.json +++ b/phishing-email-analyzer/frontend/package.json @@ -5,8 +5,8 @@ "ng": "ng", "start": "ng serve --configuration=en", "start:pl": "ng serve --configuration=pl", - "start:i18n": "npm run build:i18n && npm run serve:ssr:app", - "build:i18n": "ng build --configuration=i18n", + "start:prod": "npm run build:prod && npm run serve:ssr:app", + "build:prod": "ng build --configuration=production", "watch": "ng build --watch --configuration development", "extract-i18n": "ng extract-i18n --format xlf2 --output-path src/locale --out-file messages.xlf", "test": "ng test",