question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Consider replacing rollup/plugin-sucrase with rollup-plugin-typescript2

See original GitHub issue

One 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:closed
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
dummdidummcommented, Oct 20, 2020

+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.

1reaction
benmccanncommented, Oct 20, 2020

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found