Is it possible to put a reference in my code to .js
files and have typescript combine them as part of its final build?
What I'm trying to obviate here is the need for any tools that do combining, script tags, or requiring a loader when all I'm producing are internal modules.
Note: I am not talking about .d.ts
files which I'm aware of. I'm looking for ways to include the actual JavaScript files in the .js
output from tsc
.
I tried to include js
file with this, and it worked. The js
files are added to the build folder.
{
"compilerOptions": {
...
"allowJs": true,
"outDir": "./build/",
...
},
"include": ["src/**/*"],
"exclude": ["node_modules", "**/*.spec.ts"]
}
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