Skip to content

Fix Performance Bar, Sentry and Jira Connect App on relative urls

Lukas Eipert requested to merge 323051-dynamic-assets-fixes into master

What does this MR do?

We are currently setting a global variable __webpack_public_path__ in a global JavaScript function that gets the value from the Gon object. This just happens in the page specific JavaScript. The value from this variable is used for e.g. dynamically loading JavaScript assets like the WebIDE or parts of the PerformanceBar.

In order to add that functionality to the other entry points (Performance Bar, Sentry and Jira Connect App), we have to add the import of app/assets/javascripts/webpack.js to them.

Unfortunately we cannot move this to a global helper because setting __webpack_public_path__ needs to happen within the webpack context. In order raise awareness we are adding a note to the webpack config.

This can potentially be resolved in WebPack 5 as they have an auto option for publicPath

Screenshots (strongly suggested)

Before After
before after

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #323051 (closed)

Edited by Lukas Eipert

Merge request reports