visual studio code - Tell the TypeScript compiler where to look for non-relative modules -


i'm using ts-loader , webpack compile .ts files. in webpack config have following configuration:

resolve: {   modulesdirectories: ['shared', 'node_modules'] } 

this allows me import component lives in shared directory without spelling out full relative path. example: import button 'components/button'

webpack walk directory tree looking shared directory. way, component can live in ../../shared/components/buttton.tsx , webpack find , bundle it.

this works fine, getting errors in editors (both sublime , vs code). also, if run tsc command command line compiler errors because ts compiler not know how resolve modules.

is there way tell ts compiler recursively component in shared directories?

i using ts 2.1v

i noticed new baseurl , paths configuration options not able use them successfully.

is there way tell ts compiler recursively component in shared directories

not recursively. can go 1 level using paths mapping.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -