aleclarson / vite-tsconfig-paths

Support for TypeScript's path mapping in Vite
MIT License
1.24k stars 43 forks source link

Typings issue import from type:module (esm) project #69

Closed tianyingchun closed 1 year ago

tianyingchun commented 1 year ago

This expression is not callable. Type 'typeof import("/users/tianyingchun/documents/armitjs/armit/node_modules/vite-tsconfig-paths/dist/index")' has no call signatures.ts(2349)

import tsconfigPaths from 'vite-tsconfig-paths';
import { defineConfig } from 'vitest/config';

export default defineConfig({
  plugins: [tsconfigPaths()],
  test: {
image
aleclarson commented 1 year ago

Looks like moduleResolution: "node16" or "nodenext" (in tsconfig.json) is to blame here

aleclarson commented 1 year ago

Fixed in v3.5.2