chore: Fix web build sourcemap paths
Issue: [WebIDE] Set up sourcemaps in Web IDE (gitlab-web-ide#497 - closed)
Description
It fixes the source maps in the GitLab VSCode Extension web build by applying the following changes to the ESBuild configuration:
- Disable minification outside of the CI environment.
- Set a
sourceRootproperty that helps web browsers to place the source code directory structure in a better place relative to the real javascript assets.
| Before | After |
|---|---|
|
|
NOTE Line number mapping when debugging is still a bit wonky but this is true for debugging any VSCode Extension in the Web IDE
Related Issues
Issue: [WebIDE] Set up sourcemaps in Web IDE (gitlab-web-ide#497 - closed)
How has this been tested?
- Check out this branch in the Web IDE's GitLab VSCode extension submodule.
- Start the Web IDE using
yarn start:example - Set a breakpoint in one of the GitLab VSCode Extension files in the Web Browser debugger. Be aware that line position is a bit off so your breakpoint needs to be 2-3 lines below the intended target.
-
If src/browserorsrc/commonhas been modified, please consider interoperability with the Web IDE. See Running the Extension in WebIDE. -
Consider an end-to-end test for significant new features that aren't covered by integration tests.
Screenshots (if appropriate)
What CHANGELOG entry will this MR create?
-
fix:Bug fix fixes - a user-facing issue in production - included in changelog -
feature:New feature - a user-facing change which adds functionality - included in changelog -
BREAKING CHANGE:(fix or feature that would cause existing functionality to change) - should bump major version, mentioned in the changelog -
None - other non-user-facing changes
Edited by Enrique Alcántara

