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

add: support source maps for tsx #186

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tomzacchia
Copy link

As describe in this babel-loader issue this configuration is needed to see/debug original code in devtools > soruces

// DummyComponent.tsx in DevTools when sourceMap: false

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
exports.__esModule = true;
var react_1 = __importDefault(require("react"));
function DummyComponent() {
    return (react_1["default"].createElement("div", null,
        react_1["default"].createElement("h1", null, "hello world")));
}
exports["default"] = DummyComponent;

// DummyComponent.tsx in DevTools when sourceMap: true

import React from 'react';

function DummyComponent() {
  return (
    <div>
      <h1>hello world</h1>
    </div>
  );
}

export default DummyComponent;

As describe in this [babel-loader issue](babel/babel-loader#820) this configuration is needed to debug original code in `devtools > soruces`
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.

1 participant