Skip to content

Sourcemaps broken in simplest example #2990

@tmcw

Description

@tmcw
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

I'd expect sourcemaps of a basic module to enable breakpoint selection on all lines, except those clearly represented differently through transpilation.

Current Behavior

A basic component is not debuggable with sourcemaps: clicking on a line to set a breakpoint does not set a breakpoint at that line.

Steps to Reproduce (for bugs)

  1. Example: https://github.com/tmcw/next-sourcemap-breakage-example

Single page with the source:

import {Component} from "react";
export default class Button extends Component {
  render() {
    function foo() {
      console.log(1);
    }
    return <button onClick={foo}>hi</button>
  }
};

Setting a breakpoint on the line

      console.log(1);

Is not possible:

next-bug

Context

This makes debugging applications quite difficult.

Your Environment

Tech Version
next 3.2.2
node 8.4.0
OS macOS 10.12.6
browser Google Chrome 61.0.3163.100

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions