You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm coding a typescript project that depends on private typescript dependencies.
My first step was to find a way to have the power of typescript completion on vscode. I had two solutions for that:
Write module.d.ts for each of my private dependencies and transpile them into javascript.
Find a way for my project to use typescript node_modules
With babel-plugin-module-resolver, I've written done this .babelrc file:
/home/xxx/Project/node_modules/private-lib1/srcs/index.ts:1
export * from './api';
^^^^^^
SyntaxError: Unexpected token 'export'
at wrapSafe (internal/modules/cjs/loader.js:1067:16)
at Module._compile (internal/modules/cjs/loader.js:1115:27)
at Module._compile (/home/xxx/Project/node_modules/pirates/lib/index.js:99:24)
at Module._extensions..js (internal/modules/cjs/loader.js:1171:10)
at Object.newLoader [as .ts] (/home/xxx/Project/node_modules/pirates/lib/index.js:104:7)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Module.require (internal/modules/cjs/loader.js:1040:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/home/xxx/Project/srcs/router/auth.ts:3:1)
So babel find the file, my completion work like a charm but babel connot transpile my dependencies. Do you know why or even better got a solution ?
Hello everyone,
I'm coding a typescript project that depends on private typescript dependencies.
My first step was to find a way to have the power of typescript completion on vscode. I had two solutions for that:
With babel-plugin-module-resolver, I've written done this .babelrc file:
And I appended this to my tsconfig.json file:
When a run babel I get this error:
So babel find the file, my completion work like a charm but babel connot transpile my dependencies. Do you know why or even better got a solution ?
This is my package.json devDependencies:
Thank you so much !
The text was updated successfully, but these errors were encountered: