OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Use explicit fast build without source maps and minify for testing and PullPreview (#16563)
Oliver Günthercc7461b69fbb
diff --git a/docker/ci/entrypoint.sh b/docker/ci/entrypoint.shindex 6c41d9e9cde..d4dc280c922 100755--- a/docker/ci/entrypoint.sh+++ b/docker/ci/entrypoint.sh@@ -92,7 +92,7 @@ backend_stuff() {}frontend_stuff() {- execute_quiet "DATABASE_URL=nulldb://db time bin/rails openproject:plugins:register_frontend assets:precompile"+ execute_quiet "OPENPROJECT_ANGULAR_BUILD=fast DATABASE_URL=nulldb://db time bin/rails openproject:plugins:register_frontend assets:precompile"execute_quiet "cp -rp config/frontend_assets.manifest.json public/assets/frontend_assets.manifest.json"}diff --git a/docker/pullpreview/docker-compose.yml b/docker/pullpreview/docker-compose.ymlindex 7c9664a6063..f6a3bb409c3 100644--- a/docker/pullpreview/docker-compose.yml+++ b/docker/pullpreview/docker-compose.yml@@ -14,7 +14,7 @@ x-defaults: &defaultsbuild:context: .args:- OPENPROJECT_ANGULAR_UGLIFY: "false"+ OPENPROJECT_ANGULAR_BUILD: "fast"restart: unless-stoppedenv_file:- .env.pullpreviewdiff --git a/frontend/angular.json b/frontend/angular.jsonindex 4be28893883..7c48128237c 100644--- a/frontend/angular.json+++ b/frontend/angular.json@@ -102,38 +102,6 @@}]},- "fastprod": {- "index": "",- "preserveSymlinks": true,- "optimization": false,- "outputHashing": "all",- "sourceMap": false,- "namedChunks": false,- "extractLicenses": false,- "buildOptimizer" : false,- "fileReplacements": [- {- "replace": "src/environments/environment.ts",- "with": "src/environments/environment.prod.ts"- }- ]- },- "ci": {- "index": "",- "preserveSymlinks": true,- "optimization": false,- "outputHashing": "all",- "sourceMap": false,- "namedChunks": false,- "extractLicenses": false,- "buildOptimizer" : false,- "fileReplacements": [- {- "replace": "src/environments/environment.ts",- "with": "src/environments/environment.prod.ts"- }- ]- }}},"serve": {diff --git a/frontend/extra-webpack.config.js b/frontend/extra-webpack.config.jsindex 2eef5b817f1..4ca5c933c4b 100644--- a/frontend/extra-webpack.config.js+++ b/frontend/extra-webpack.config.js@@ -5,7 +5,7 @@ module.exports = {minimizer: [new TerserPlugin({terserOptions: {- mangle: process.env.OPENPROJECT_ANGULAR_UGLIFY !== 'false',+ mangle: process.env.OPENPROJECT_ANGULAR_BUILD !== 'fast',keep_classnames: true,keep_fnames: true,}diff --git a/frontend/package.json b/frontend/package.jsonindex 6ab4fc9227f..5615a4afe82 100644--- a/frontend/package.json+++ b/frontend/package.json@@ -162,8 +162,7 @@},"scripts": {"analyze": "ng build --configuration production --stats-json && webpack-bundle-analyzer -h 0.0.0.0 -p 9999 ../public/assets/frontend/stats.json",- "build:ci": "node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng build --configuration ci",- "build:fast": "OPENPROJECT_ANGULAR_UGLIFY=false node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng build --configuration fastprod",+ "build:fast": "OPENPROJECT_ANGULAR_BUILD=fast node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng build --configuration production","build": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build --configuration production --named-chunks --source-map","build:watch": "node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build --watch --named-chunks","tokens:generate": "theo src/app/spot/styles/tokens/tokens.yml --transform web --format sass,json --dest src/app/spot/styles/tokens/dist",diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rakeindex 63f497fc0e4..4e170ce29d9 100644--- a/lib/tasks/assets.rake+++ b/lib/tasks/assets.rake@@ -63,9 +63,7 @@ namespace :assets doputs "Building angular frontend"Dir.chdir Rails.root.join("frontend") docmd =- if ENV["CI"]- "npm run build:ci"- elsif ENV["OPENPROJECT_ANGULAR_UGLIFY"] == "false"+ if ENV["OPENPROJECT_ANGULAR_BUILD"] == "fast""npm run build:fast"else"npm run build"