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

Fix minified source-map outputs format #504

Merged
merged 2 commits into from
Feb 12, 2020
Merged

Conversation

legendecas
Copy link
Contributor

Also added test infrastructure to validate generated source-maps.

src/index.js Outdated
@@ -366,7 +366,7 @@ module.exports = (
// For some reason, auth0 returns "undefined"!
// custom terser phase used over Webpack integration for this reason
if (result.code !== undefined)
({ code, map } = { code: result.code, map: result.map });
({ code, map } = { code: result.code, map: map ? JSON.parse(result.map) : undefined });
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
({ code, map } = { code: result.code, map: map ? JSON.parse(result.map) : undefined });
({ code, map } = { code: result.code, map: sourceMap ? JSON.parse(result.map) : undefined });

Should this use the sourceMap flag instead? It looks like map has several meanings.

cc @guybedford

Copy link
Member

@styfle styfle left a comment

Choose a reason for hiding this comment

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

Thanks!

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.

2 participants