Type error differences between `tsc` and `microbundle`
See original GitHub issueReproduction:
- Clone https://github.com/tom-sherman/immurl @ bb2644ecfe1bb4f2098c02df813acf5cf2d5de07
npm i
npm run typecheck
- No type errorsnpm run build
- Type errors from microbundle- Uncomment methods from bottom of
lib/immurl.ts
npm run typecheck
- Type errors fromtsc
npm run build
- No type errors
Is this a bug or am I missing some configuration? It looks like microbundle is using different lib definitions to typescript here.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
microbundle vs tsc vs tsdx vs tsup vs typescript-starter | npm trends
Works with React; Human readable error messages (and in VSCode-friendly format); Bundle size snapshots; Opt-in to extract invariant error codes; Jest test ...
Read more >Wrong typescript emit path if --cwd is used · Issue #643 - GitHub
SHOULD: Types should be emitted into the dist folder xyz/dist of the ... the ts emit path is different but still wrong: dist/main.d.ts ......
Read more >Options for Publishing TypeScript Libraries | by Jake Ginnivan
This is a bit of a brain dump for myself around the different options out there and some considerations for each.
Read more >You may not need a bundler for your NPM library
I'd recommend just compiling your code with tsc , no bundler involved. This way, you can develop with typescript, it will output js...
Read more >Compiling ts libraries - Which Bundler / Compiler : r/typescript
Just wondered since I am working with microbundle and was recently thinking "Why did I choose microbundle over tsc?" and the only answer...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sure, mentioning it in the README is a good idea! We’re always using the
esnext
target andESNext
as the module type. This ensures thatmicrobundle
works with any future TypeScript version. Happy to review any PRs 👍@marvinhagemeister
This is the part I was missing and isn’t mentioned in the docs and I don’t think many people would say that was obvious. Would you up for reviewing a PR that clarifies this in the README and strongly recommends to match whatever microbundle’s target/module is in the tsconfig?