News for hackers. Stuff that matters.
Re:Finally, a guide for Node.js and TypeScript and ESM that ... by azangru on Tuesday November 21, 2023 @07:49AM (#38362958)
And for development?
Re:Finally, a guide for Node.js and TypeScript and ESM that ... by demurgos on Tuesday November 21, 2023 @07:53AM (#38363010)
With TS, I get type checking in the IDE; I don't need to rebuild every few seconds.

When I actually need to build and test, it's very fast (<2 seconds). I use Yarn workspaces/subprojects and TypeScript references with incremental builds so it's not really an issue.

Here is the `package.json` [0] for a serialization lib I did, you can check the `scripts` section: it's very minimal and I'm quite happy with it. I'm an old Gulp maintainer, so for a long time I had heavy Gulp config with a lot of processing. Over the years I could get rid of it. ESM was the last thing holding me back; and now I'm so happy that I can just use a few simple commands.

[0]: https://github.com/demurgos/kryo/blob/master/packages/kryo/p...