Skip to content

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

Make jQuery an external script, load immediately

Alexander Brandon Colesaec52d6c2515
diff --git a/app/helpers/frontend_asset_helper.rb b/app/helpers/frontend_asset_helper.rb
index a4ffa62d710..ae4a17097e4 100644
--- a/app/helpers/frontend_asset_helper.rb
+++ b/app/helpers/frontend_asset_helper.rb
@@ -49,6 +49,8 @@ module FrontendAssetHelper
# or referencing the running CLI proxy that hosts the assets in memory.
def include_frontend_assets
capture do
+ concat nonced_javascript_include_tag variable_asset_path("jquery.js"), skip_pipeline: true
+
%w(polyfills.js main.js).each do |file|
concat nonced_javascript_include_tag variable_asset_path(file), skip_pipeline: true, type: "module"
end
diff --git a/frontend/angular.json b/frontend/angular.json
index a5bc59e3ee1..9ae747d2ac3 100644
--- a/frontend/angular.json
+++ b/frontend/angular.json
@@ -67,7 +67,13 @@
"src/assets/sass"
]
},
- "scripts": []
+ "scripts": [
+ {
+ "input": "node_modules/jquery/dist/jquery.min.js",
+ "inject": false,
+ "bundleName": "jquery"
+ }
+ ]
},
"configurations": {
"production": {