VS Code Ignore folder for auto-import
-
I'm using VS Code for an Angular (currently 9) project along with Angular's plug-in, which works really well for the most part. However, I'm having problems with auto import looking at the
out-tsc
folder and sometimes importing stuff from there (which is obviously wrong and causes other problems).The setup is basically:
project/ src/ out-tsc/ [other normal stuff you'd expect like node_modules, etc]
My source files are (duh) inside
project/src/...
andout-tsc
is where the typescript compiler outputs. I didn't set this up, but I assume this is the default to how angular-cli set stuff up.I've added various combinations of stuff to the VS Code "Ignore Files" (
out-tsc/**
,**/out-tsc/**
etc as recommended by various things on the web but those don't seem to do anything.- Is there some other setting I should be using?
- Do I just have the wrong glob to tell VSC what to ignore?
- Do I need to put my
out-tsc
somewhere else (temp file, aboveproject
in the hierarchy)?
-
@boomzilla My current workspace ignore is
**/.git **/.svn **/.hg **/CVS **/.DS_Store
(I think that's the default)
So I think what you want is
**/out-tsc
(our build directory is outside the project space)
-
Just to make sure: You're using that setting?
There's also an exclude in
tsconfig.json
, that's why I'm asking.
-
@Rhywden said in VS Code Ignore folder for auto-import:
Just to make sure: You're using that setting?
Yes. That's the setting I used. It currently has exactly what you show plus the
**/out-tsc
pattern that I added.
-
Two things I don't understand:
- why has that setting not worked for you, when it worked for me? (rhetorical question)
- why does the out-tsc folder even exist for you? In my case the Angular build system drives the TS compiler through some sort of an API and the only thing that gets generated during build is the
dist
folder
-
@boomzilla said in VS Code Ignore folder for auto-import:
out-tsc is where the typescript compiler outputs. I didn't set this up
it's set up by
tsconfig.json
, you can change that.