Consider replacing rollup/plugin-sucrase with rollup-plugin-typescript2
See original GitHub issueOne of the most impactful changes that we made in the Sapper codebase recently was replacing rollup/plugin-sucrase
with rollup-plugin-typescript2
. It uncovered lots of type checking errors and made the codebase far more robust because sucrase doesn’t do any type checking. There was some concern about speed but rollup-plugin-typescript2
allows you to pass a flag that disables type checking, so we did that by default, which was just as fast (or faster? I can’t remember), but then added a command in package.json
that does type checking which we’re able to run on the GitHub Actions CI
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
ezolenko/rollup-plugin-typescript2 - GitHub
This is a deep merge: objects are merged, arrays are merged by index, primitives are replaced, etc. Increase verbosity to 3 and look...
Read more >@rollup/plugin-typescript - npm
Start using @rollup/plugin-typescript in your project by running `npm i ... This plugin requires an LTS Node version (v14.0.0+) and Rollup ...
Read more >variable declaration doesn't compile with rollup - Stack Overflow
Fixed it by moving the plugins on the rollup configuration Seems like there's a conflict and typescript needs to be first above the...
Read more >Rollup Plugin Sucrase: Compile TypeScript, Flow, JSX, Etc ...
In this library, we will learn about Rollup Plugin Sucrase: Compile TypeScript, Flow, JSX, Etc with Sucrase. ... Best TypeScript 2 detailed explanation!...
Read more >Top 5 rollup-plugin-typescript2 Code Examples - Snyk
Learn more about how to use rollup-plugin-typescript2, ... commonjs from 'rollup-plugin-commonjs'; export const plugins = { replace: replace({ 'process.env.
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 FreeTop 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
Top GitHub Comments
+1 on adding type checking early, or at least adding it soon, at some point it may become hard to sort out all the type errors that sneaked in.
typescript-eslint
is mainly around checking style rules. It has a bit different set of functionality than the TypeScript compiler. They’re both helpful, but check different things