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

[ui-build] add strip-sourcemap-loader to remove 3rd party hardcoded m… #3959

Merged

Conversation

bjornalm
Copy link
Collaborator

…ap references

What changes were proposed in this pull request?

It seems that references to index.mjs.map (e.g. //# sourceMappingURL=index.mjs.map) are always added to the "defaultVendors~~~~~-chunk-xxx.js" and that index.mjs.map file never exists, not even in dev mode.

After a lot of digging it seems to be that case that some third party mjs-files have these map-files references hardcoded in them. This PR provides a fix that targets the mjs files under node_modules to remove these references in our bundles using a small loader called strip-sourcemap-loader.

How was this patch tested?

  • Ran a webpack build to verify that all source map references to index.mjs.map are gone

Please review Hue Contributing Guide before opening a pull request.

Copy link

⚠️ No unit test files modified. Please ensure that changes are properly tested. ⚠️

Copy link
Collaborator

@ramprasadagarwal ramprasadagarwal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bjornalm bjornalm force-pushed the generated-static-file-refers-to-missing-index-mjs-map branch from b69bb9b to 63edd5c Compare January 20, 2025 13:27
@bjornalm bjornalm enabled auto-merge (rebase) January 20, 2025 13:27
Copy link

⚠️ No unit test files modified. Please ensure that changes are properly tested. ⚠️

@bjornalm bjornalm merged commit 5c18a60 into master Jan 20, 2025
5 of 6 checks passed
@bjornalm bjornalm deleted the generated-static-file-refers-to-missing-index-mjs-map branch January 20, 2025 13:41
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

Successfully merging this pull request may close these issues.

4 participants