Sourcemaps wrong path for js bundle
Opened this issue · 1 comments
Sourcemaps are properly generated when running oc dev
and the sourceMappingURL
comment is added properly at the bottom of both js and css files.
When the component is loaded in the browser and dev tools are used, the sourcemaps file for css is requested properly but not the js one. Resulting in the js code not being available for debugging in dev tools.
Who is the bug affecting?
Component creators
What is affected by this bug?
Development environment
When does this occur?
When debugging the component using oc dev
.
Where on the platform does it happen?
In the browser
How do we replicate the issue?
- Preview an OC component using
oc dev
command. - Open dev tools in the browser
- Try to find any client side js file in dev tools for debugging purposes
- Look at the http GET requests for sourcemaps logged in the command line.
Expected behavior (i.e. solution)
The path to request js sourcemaps should be correct.
What version of OC, Node.js and OS are you using?
OC@0.49.23, Node 16.20.0, macOS Ventura 13.3.1
Other Comments
There is a manual workaround which is to change the value of sourceMappingURL
in the generated js file with the full path, but this is far from ideal because it needs to be done every time the bundle is regenerated.