-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support TypeScript assets #925
Comments
Trunk doesn't compile anything at the moment. It only orchestrates the build. For JavaScript, it will directly use the provided JS file, without any compilation. You can use the hooks, to trigger an Assuming you'd want to do this without |
You don't need Lines 19 to 28 in 512c5b1
|
So assuming you had an |
For the simplest case: $ echo 'const foo: number = 5; console.log(foo);' >index.ts
$ tsc index.ts
$ cat index.js
var foo = 5;
console.log(foo); But maybe you can also include additional compiler options, like with |
I do recall that there may be a |
If projects are to be supported, you can use the If you want to support bundling, there's https://github.com/egoist/tsup, which makes inlining multi-file projects easier. |
Thanks for all the explanations! That really helps. So I think a good first step might be to just add |
Yeah, simple |
Heads up! Currently I use rollup because I use a large TypeScript library and compile that in a hook. I am afraid, just using |
It would be nice if Trunk can automatically compile TypeScript to JavaScript, so that they can be inlined. Currently, the following:
Will cause an error:
The text was updated successfully, but these errors were encountered: