-
Notifications
You must be signed in to change notification settings - Fork 13k
Description
Bug Report
π Search Terms
- safe list
- safelist
- minimized file
- .min.js
π Version & Regression Information
TS Server 5.0.4 used in VSCode 1.78.1
β― Playground Link
N/A -- only reproducible in projects
π» Code
https://github.com/rwalle/ts_bug_example
import _ from 'lodash/lodash.min.js';
Our project does not use npm module system. jsconfig.json
is correctly set up: https://github.com/rwalle/ts_bug_example/blob/main/dev/apps/app1/jsconfig.json. We import from file directly instead of using package name.
π Actual behavior
lodash.min.js
ignored in module import autocompletion suggestion

It seems that all these files including certain jQuery files etc are ignored:
TypeScript/src/server/editorServices.ts
Line 387 in f0ff976
const defaultTypeSafeList: SafeList = { |
TypeScript/src/server/editorServices.ts
Line 4112 in f0ff976
if (/^.+[\.-]min\.js$/.test(normalizedNames[i])) { |
I can understand why this is done for "regular" JS projects using npm modules or TS projects with or without @types
, but this should not be generalized when looking up a file/files in arbitrary JS projects, especially when various options in compilerOptions
of jsconfig.json
is meant to specifically address such use cases.
π Expected behavior
lodash.min.js
should show up just like anotherFile.js
.