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

The map file incorrectly contains the dist/ prefix in & file sources fields #5285

Closed
mgol opened this issue Jul 6, 2023 · 1 comment · Fixed by #5286
Closed

The map file incorrectly contains the dist/ prefix in & file sources fields #5285

mgol opened this issue Jul 6, 2023 · 1 comment · Fixed by #5286

Comments

@mgol
Copy link
Member

mgol commented Jul 6, 2023

Description

The dist/jquery.min.js.map file generated by Terser contains two fields with incorrect values:

"file":"dist/jquery.min.map",
"sources":["dist/jquery.js"]

The proper values are:

"file":"jquery.min.js",
"sources":["jquery.js"]

and that's what we have on the 3.x-stable line with UglifyJS.

Note that not only the dist/ prefix should go away but also the Terser's source map incorrectly points to itself in the file property.

We need to fix it before the final 4.0.0 release.

Link to test case

@mgol mgol added this to the 4.0.0 milestone Jul 6, 2023
@mgol mgol self-assigned this Jul 6, 2023
mgol added a commit to mgol/jquery that referenced this issue Jul 6, 2023
Also, as part of this, fix the `file` & `sources` properties of the source map
file.

Fixes jquerygh-5285
Ref jquerygh-5258
@mgol
Copy link
Member Author

mgol commented Jul 6, 2023

Switching to SWC and fixing this as well in #5286.

mgol added a commit that referenced this issue Jul 10, 2023
Also, as part of this, fix the `file` & `sources` properties of the source map
file.

Fixes gh-5285
Closes gh-5286
Ref gh-5258
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

1 participant