Sucrase is intended to make programming more fun by making builds faster. Sucrase assumes a developer is using a recent browser or a recent version of Node.js. Thus, it focuses on compiling non-standard language extensions such as TypeScript, Flow, and JSX. This narrower scope enables leveraging of a compiler architecture that is much more performant, albeit less extensible and maintainable. As a result, developers are advised to think carefully about using Sucrase in production. Babel or tsc is more suitable for production builds in most cases.
The creators of Sucrase also cite these limitations:
- Sucrase does not check code for errors and should always be used with a linter or typechecker.
- Sucrase does not leverage plug-ins. Transforms need to be written to cooperate with each other; each additional transform takes significant work.
- The tool is not good for prototyping language extensions and upcoming language features. The faster architecture of Sucrase makes new transforms more fragile and more difficult to write.