Disable Auto Transpiling TS to JS Follow
I'm already using webpack to transpile, so I don't want this feature enabled.
How do I disable automatic TS to JS transpiling?
Please sign in to leave a comment.
In WebStorm 2018.1.x, it's Preferences | Languages & Frameworks | TypeScript, Recompile on changes
Make sure that 'Enable TypeScript compiler' is disabled in Preferences | Languages & Frameworks | TypeScript, and that you don't have TypeScript file watcher set up in Preferences | Tools | File Watchers
Thanks Elena . It worked.
Ok, I think this was created by the Nativescript run command
>After every new startup Recompile on changes is turned on again.
seems IDEA has troubles updating your project .xml files... do you have
.idea\compiler.xmlin your project, what does it look like? Do you version control this file?
Also, please can you try recreating the issue and attach the
Thanks Elena! That worked!
Hey Elena can you let m know how to do the same in Webstorm because I don't find to enable typeScript compiler in languages & framework in preferences.
sure - see above (https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000098564/comments/360000051999)
Seems like it doesn't work with TypeScript references with emitDeclarationOnly, for instance, in lerna projects. We need to recompile on each change into dist folder in each learna package, so Recompile on Change flag should be checked, but it should not produce .js files, like WS does now
please can you provide your tsconfig.json?
Hi, It seems to still compile in JS for me,
even though the "recompile on changes" check is off.
What can I do?
see if you have any file watchers set up
won't that disable the rest of the typescript language services from working?
haven't got what you mean, sorry... disabling "recompile on changes" doesn't disable services
After every new startup Recompile on changes is turned on again. I supposed that it is because file watcher, but the trouble is that I do not have File Watcher as stated previously in Preferences | Tools | File Watchers . BUT In my Idea 2019.1.2 Ultimate Edition it is missing? How can I disable it in my case?
I am having the same issue. Recomplor-on keeps turning on and transpiling occurs.
This is not working for me. I have disabled "Recompile on changes" and have no file watchers. It wouldn't be a big issue if it weren't for the debugger behaviour. Adding a breakpoint does nothing and if I add a "debugger" it stops but in the js file.
>I have disabled "Recompile on changes" and have no file watchers.
It must be some other tool then. Make sure that no watchers are run for your project
>It wouldn't be a big issue if it weren't for the debugger behaviour. Adding a breakpoint does nothing and if I add a "debugger" it stops but in the js file.
haven't got how it's related to disabling the auto-transpiling.
Please share a project that can be used to recreate the issue
Is it possible to disable TypeScript transpilation on changes for a specific directory in the project?
The use case is in a monorepo with a bunch of microservices, and one web server. The microservice directories benefit from "Recompile on changes", but the webserver does that on its own (webpack, parcel etc.)
You can try adding a tsconfig.json with
to this specific directory
I have a monorepo project with about ~150 typescript files. Dozens of times a day (not sure exact event) WebStorm is auto-compiling some or all of the TypeScript to adjacent JS files and source maps (see the red files in the image - indicating they are not added to GIT).
TypeScript compile should not be happening according to settings:
Each individual package within the monorepo has its own tsconfig.json, specifying the output location - which is not adjacent, and which works fine within the project's own build process:
The base tsconfig.json looks like this:
I am not using any WebStorm file watchers, I run `tsc -b --watch` from a script, which works correctly with my tsconfig settings and does not put these adjacent JS / map files all over the place. In other words there's nothing else in the environment that I can see would be causing adjacent, compiled versions of my TypeScript files to appear out of nowhere. There's no configuration that would cause adjacent files.
Each time it happens I have to right-click on "Unversioned files" in the Git Local Changes window and select "Delete", which takes a few seconds. It's become highly distracting and frustrating.
How can I completely and definitively prevent WebStorm from doing any TypeScript compilation at all, whilst still keeping the IDE editor error checking?
Make sure that Recompile on changes is disabled in Settings | Languages & Frameworks | TypeScript. If it doesn't help, then it must be some external tool that is triggered on saving that compiles the files
Thanks Elena. As you can see from the screenshot that I provided previously that option is already disabled.
I can find no sign of this mystery external tool, but I have recreated its behaviour. Whilst my main build script in package.json uses tsc with the "-b" option, which does a monorepo-style build of multiple typescript projects in the repo based on the "references" entry in the base tsconfig.json, I can recreate these adjacent files appearing by doing a tsc without the "-b" option and hence ignoring the individual tsconfig.json files in the referenced sub-folders.
I have added the line:
to my base tsconfig.json, which essentially means it wont compile anything if run without the "-b" flag, and that seems to have stopped the mystery "external tool" from auto-compiling my typescript, leaving my normal build process to run undisturbed and preventing these adjacent files from appearing.