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

Do not mutate browser source map object #2900

Merged
merged 1 commit into from
Sep 4, 2017

Conversation

kpdecker
Copy link
Contributor

@kpdecker kpdecker commented Sep 3, 2017

Fixes regression caused by #2478

@@ -252,13 +252,14 @@ export default async function createCompiler (dir, { buildId, dev = false, quiet
let output = transpiled.code

if (map) {
map.sources = map.sources.map((source) => source.replace(/\?entry/, ''))
delete map.sourcesContent
let nodeMap = Object.assign({}, map)
Copy link
Member

Choose a reason for hiding this comment

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

I guess this can be just const since you're not reassigning the variable.

@frol
Copy link
Contributor

frol commented Sep 4, 2017

I have just tested the fix (#2816 (comment)) and it works for me! @kpdecker Thank you!

Copy link
Member

@timneutkens timneutkens left a comment

Choose a reason for hiding this comment

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

Besides the const vs let comment everything's 💯 Thanks @kpdecker

@timneutkens timneutkens merged commit 5c67fd6 into vercel:master Sep 4, 2017
@timneutkens
Copy link
Member

@arunoda can you release this asap ❤️ Thanks!

@kpdecker kpdecker deleted the browser-source-map-fix branch September 21, 2017 14:43
@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants