Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sourcemaps wrong path for js bundle #1341

Open
arnaugm opened this issue Jun 9, 2023 · 1 comment
Open

Sourcemaps wrong path for js bundle #1341

arnaugm opened this issue Jun 9, 2023 · 1 comment

Comments

@arnaugm
Copy link

arnaugm commented Jun 9, 2023

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.

node_culture-selector_node_modules_oc_dist_oc-cli_js_dev__

Component_Info_and_node_culture-selector_node_modules_oc_dist_oc-cli_js_dev__

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?

[email protected], Node 16.20.0, macOS Ventura 13.3.1

Other Comments

@arnaugm
Copy link
Author

arnaugm commented Jun 9, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant