parcel-bundler / parcel

The zero configuration build tool for the web. 📦🚀
https://parceljs.org
MIT License
43.49k stars 2.27k forks source link

types.d.ts file bugs #7466

Closed izengliang closed 2 years ago

izengliang commented 2 years ago

🐛 bug report

src/index.ts

import { LitElement, css, html } from "lit";

dist/types.d.ts

import { LitElement as  } from "lit"; // bugs

🎛 Configuration (.babelrc, package.json, cli command)

.parcelrc

{
  "extends": "@parcel/config-default",
  "transformers": {
    "*.{ts,tsx}": ["@parcel/transformer-typescript-tsc"]
  }
}

tsconfig.json

{
  "compilerOptions": {
    "target": "es6",
    "strict": false,
    "allowSyntheticDefaultImports": true,
    "experimentalDecorators": true,
    "jsxImportSource": "preact",
    "isolatedModules": true,
    "esModuleInterop": true,
    "moduleResolution": "Node",
    "module": "es2020",
    "resolveJsonModule": true,
    "strictNullChecks": false
  }
}

🌍 Your Environment

Software Version(s)
Parcel 2.0.1
Node v14.17.6
npm/Yarn npm@7.24.1
Operating System macOs 11.4
Shinyaigeek commented 2 years ago

Thank you for reporting! This issue seems to be dup of #7325, and seems to be fixed in #7426. it works fine with the current v2 branch.