Skip to content

Minimized files ignored in JS projects using jsconfig.json "path"Β #54232

@rwalle

Description

@rwalle

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

Screenshot 2023-05-12 200005

It seems that all these files including certain jQuery files etc are ignored:

const defaultTypeSafeList: SafeList = {

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions