This is an example of how to get Typescript working with Mojolicious. To also get end-to-end (e2e) tests with Playwright, see kraih's Playwright and Mojolicious.
This repository includes a configuration for Typescript. Since Typescript cannot yet bundle itself into a single file, this repository uses Webpack to bundle the application for the web. There are other ways to load your compiled app, but they require ES6 modules (not well-supported) or some custom boilerplate for AMD modules.
$ cpanm -n --installdeps .
...
$ npm i
...
$ npx webpack
...
$ ./myapp.pl daemon
Web application available at http://127.0.0.1:3000