Skip to content

Sourcemaps wrong path for js bundle #1341

@arnaugm

Description

@arnaugm

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions