0

I can't find out how to make TS check for modules not only node_modules directory but other custom directories too.

My situation:

# webpack config
resolve: {
  modules: ['components', 'node_modules']
}

# index.vue
import WorkspaceToolbar from 'WorkspaceToolbar' // TS can't find this module since it doesn't look in components dir.

So, is it possible to make TS check for modules like webpack does?

shpindler
  • 357
  • 2
  • 12

1 Answers1

0

I solved the problem. It was due to a lack of knowledge of TS. To find modules I just need to declare them using declare module in *.d.ts files.

shpindler
  • 357
  • 2
  • 12