It's possible to tell TypeScript compiler to bundle all files together into single build file using outFile
option.
But it would bundle the *.ts files only and none of the dependencies from node_modules
or the implementation of AMD loader.
I wonder if it's possible to tell TypeScript compiler to bundle everything in that file?
P.S.
I know about Brunch, WebPack and other bundle tools, but for simple cases it seems like an overkill, I'd like to get away with TS compiler only if possible.
Late to the party, but I've written SAMD for this use case: https://github.com/morris/samd
It provides a minimal AMD implementation, sufficient for TypeScript AMD bundles and dependencies included via regular script tags.
It does not bundle dependencies, but you can simply concatenate dependencies if you want a single-file bundle (see README).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With