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

Wrong relative path for module-create in source map #994

Open
krampstudio opened this issue Oct 18, 2018 · 1 comment
Open

Wrong relative path for module-create in source map #994

krampstudio opened this issue Oct 18, 2018 · 1 comment

Comments

@krampstudio
Copy link

When generating a bundle with the options create : true and no optimizer, the source map contains an artificial entry module-create.js in the sources (from https://github.com/requirejs/r.js/blob/master/build/jslib/build.js#L2125)

The problem is the relative path to this entry seems to be generated from the root of the build location. In my case it contains

{
  "version":3,
  "sources":[
    //... all soures are listed with a correct rel path and then
    "../../../../../../../../../../../module-create.js"
]
//...
}

If this has no real impact on the browser debugging, it creates different source maps based on where you launch the build.

@prantlf
Copy link

prantlf commented Apr 23, 2023

You might need to tweak the values of sources and sourceRoot in the source map. Rebase them onto your source and output locations.

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

2 participants