Skip to content

[feature request]: functional resolvePackage option/setting support #186

Open
@JounQin

Description

@JounQin

Motivation: I'm always using TypeScript personally, for most packages we can use following settings:

{
  resolvePaths: [path.resolve('node_modules/@types')],
  tryExtensions: [
    '.ts',
    '.tsx',
    '.d.ts',
    '.vue',
    '.js',
    '.jsx',
    '.json',
    '.node',
  ],
}

But it won't work for scoped packages like @babel/core, its typed definition is under @types/babel__core directory, so resolvePaths will not work for it. Of course, we can use allowModules for workaround, but it could be a mistake if we forget to install the @types/babel__core module.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions