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

Sourcemap and Breakpoint Fixes #3121

Merged
merged 2 commits into from
Oct 19, 2017

Conversation

kpdecker
Copy link
Contributor

Fixes source maps so they work properly when run in concat chunks, pages, or dynamic chunks.
Updates files names in dev mode to be constant so breakpoints will persist across page refreshes.

Fixes #2990

server/render.js Outdated
const devBuildId = Date.now()
// Hard coding build id to development to allow for breakpoints to be set across
// page reloads.
const devBuildId = 'development'
Copy link
Contributor

Choose a reason for hiding this comment

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

Won't this bring the mentioned issue #2014 back?

@kpdecker
Copy link
Contributor Author

kpdecker commented Oct 17, 2017 via email

@kpdecker
Copy link
Contributor Author

kpdecker commented Oct 17, 2017 via email

@kpdecker
Copy link
Contributor Author

@frol pulled in the explicit no-cache headers from #2680 to help avoid any issues if not using dev tools, etc.

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.

This is great @kpdecker, just tried and seems to work pretty well. One thing I noticed is that hot updates that contain errors (throw etc) don't get sourcemaps client side. Example:

export default class extends React.Component {
    render() {
        if(typeof window !== 'undefined') {
            throw new Error('Error')                   
        }
        return null
    }
}

screen shot 2017-10-18 at 21 53 16

@timneutkens timneutkens merged commit 964f229 into vercel:master Oct 19, 2017
timneutkens added a commit that referenced this pull request Oct 20, 2017
@timneutkens
Copy link
Member

Had to revert the PR:
#3134
#3135

@kpdecker
Copy link
Contributor Author

I can reproduce #3134. Appears to be timing issue between the combine assets plugin and the uglify plugin. Investigating fix there.

I have not been able to reproduce #3135, but have subscribed and will note if the reporter provides more information.

@timneutkens
Copy link
Member

Thanks @kpdecker ❤️

@kpdecker kpdecker mentioned this pull request Oct 26, 2017
@lock
Copy link

lock bot commented May 10, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@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