tvkitchen / countertop

The entry point for developers who want to set up a TV Kitchen.
https://tv.kitchen
GNU Lesser General Public License v3.0
6 stars 2 forks source link

Configure babel to handle typescript #187

Closed slifty closed 1 year ago

slifty commented 1 year ago

This PR modifies our build and lint steps (and I suppose test step) so that babel can understand typescript files that have been referenced by javascript files.

This PR is a replacement for https://github.com/tvkitchen/countertop/pull/186, which tried to go in the other direction (elimintating babel entirely and having typescript handle javascript). I think this is a cleaner approach for now due to the fact that jest needs babel in order to handle ESM.

Related to Issue #153

slifty commented 1 year ago

Wanted to note that this approach was inspired by @louh via https://github.com/streetmix/streetmix/commit/05feb8b9cf8eff6938397d12bf09e99477f0607b

louh commented 1 year ago

Glad it worked!