Skip to content

Instantly share code, notes, and snippets.

@bennett000
Last active September 3, 2018 18:43
Show Gist options
  • Save bennett000/a26dfc8cf15e5d97139e41b0711f3fe0 to your computer and use it in GitHub Desktop.
Save bennett000/a26dfc8cf15e5d97139e41b0711f3fe0 to your computer and use it in GitHub Desktop.
The Case For Shipping TypeScript as TypeScript

Current JS Module Packaging

It's 2018 and the JS community is still in the midst of unifying a module standard. There currently exist three major ways for packaging/shipping JS modules:

  • Browser bundles (IIFEs, UMD, Whatever)
  • CommonJS modules
  • ES2015 modules

Generally ES2015 modules are the "best" way to ship JS in 2018. The reasons for this come down to tree shaking and future proofing and are well discussed by others elsewhere on the internet.

The Case For Packaging TS as TS

Ended up going with TypeScript compiled by tsickle due to tooling challenges

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment