visual studio is hiding .js.map files and .js file , only the typescript .ts files are showing ,

Viewed 1249

I have used Visual Studio Code in the past for Angular 2, in which if I didn't want to SEE the .js and .js.map files it was a workplace setting place to hide from the IDE.

I'm now on a project in which VS 2017 professional is used with Typescript, jasmine , karma with Angular 4. Task Runner etc..

I want to be able to see and delete .js and .js.map files , for one karma is notorious for caching ... not fun.

  1. Some similar questions talk about project file in VS
  2. others talk about tsconfig
  3. perhaps package.json ?

I have been going through a lot of files and I don't get why the files are not around.

Here is my tsconfig.json

{
  "compileOnSave": false,
  "compilerOptions": {
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es5",
    "allowJs":  true,
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2016",
      "dom"
    ]
  }
}

That says allowJS : true

What other file(s) can I paste to show? what is happening on the compile/build?

2 Answers

It might be a VS Code Setting: files.exclude. Its value might contain a glob pattern that filters your .js files out.

You can find it in:

  • User Settings (%APPDATA%\Code\User\settings.json)
  • Workspace Settings (.vscode\settings.json)

You can toggle that behavior to show the .js files with this button in your Solution Explorer:

enter image description here

Related