10000 jsx element after import statement should parse success · Issue #10619 · swc-project/swc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
jsx element after import statement should parse success #10619
Closed
@bvanjoi

Description

@bvanjoi

Describe the bug

swc/crates/swc_ecma_parser/tests/tsc/inlineJsxFactoryDeclarations.tsx will throw a parse error but actually should not.

Input code

import { dom } from "./renderer"
<h></h>

Config

{
  "jsc": {
    "parser": {
      "syntax": "typescript",
      "tsx": true
    },
    "target": "es2015",
    "loose": false,
    "minify": {
      "compress": false,
      "mangle": false
    }
  },
  "module": {
    "type": "es6"
  },
  "minify": false,
  "isModule": "unknown"
}

Link to the code that reproduces this issue

https://play.swc.rs/?version=1.12.1&code=H4sIAAAAAAAAA8vMLcgvKlGoVkjJz1WoVUgrAlJKevpFqXkpqUWpRUpcNhl2NvoZdlwALgKL6ikAAAA%3D&config=H4sIAAAAAAAAA1WPQQ7CIBBF9z0FmbULNdGFd%2FAQpE4blAJhhihpevdCC6g75v3%2F%2BTNzJwQ8qYebmNMzDU56Qt%2FmRCgalp9EgKND6r1yDIeqMmWJfcCNLLsALP2InENI5%2BPpUgKgrSVMeJCasLBJGTXE38reTs4j0b8xW6UZdcvvjV1phck%2BwiaWU%2FK6%2BwZX%2BJpqWfsYFN1rEoJ5Gfs20C0rMmcm5RsBAAA%3D

SWC Info output

No response

Expected behavior

parse success

Actual behavior

parse failed

Version

1.12.1

Additional context

reference: https://www.typescriptlang.org/play/?#code/JYWwDg9gTgLgBAbzgEwiOBfOAzKa4BEAdAPRQCmAdsuRVAQFAA8AFgHxMnsNA

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0