Issue
I've been experimenting with different settings in my tsconfig.json
. As part of this, I want to re-compile all my TypeScript files to see how the emitted JavaScript differs with the new settings (e.g. changing the module
option).
The underlying .ts
files themselves haven't changed, however, and so calling tsc
does nothing.
How can I tell tsc
to recreate all the files even though it thinks it doesn't need to?
For reference, I'm invoking the TypeScript compiler like so:
node_modules/typescript/bin/tsc --build src/tsconfig.json
Solution
I discovered the answer - although tsc
doesn't have a "top-level" force option, since I'm already using the --build
option, I can pass --force
to that:
node_modules/typescript/bin/tsc --build --force src/tsconfig.json
From the documentation:
There are also some flags specific to
tsc -b
: [...]
--force
: Act as if all projects are out of date
Answered By - Sam
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.