This repository was archived by the owner on Dec 1, 2019. It is now read-only.
This repository was archived by the owner on Dec 1, 2019. It is now read-only.
Doesn't support importing plain d.ts files #225
Open
Description
I have a shared
module for shared interfaces between my server and my client. It contains several d.ts files with interfaces I share between my server and the UI. When I use ts-loader everything works as expected, when I use this awsome typescript loader I get:
ERROR in ./src/component.ts
Module not found: Error: Cannot resolve module 'shared/data' in ...src/component
@ ./src/component.ts 12:26-73
The shared/data should be shared/data.d.ts but it doen't find it. If I add the d.ts explicitly I get this error:
ERROR in ./src/component.ts
Module not found: Error: Cannot resolve module 'shared/data' in ...src/component.ts
@ ./src/component.ts 12:26-73
ERROR in ./~/shared/data.d.ts
Module build failed: Error: Debug Failure. False expression: Output generation failed
at Object.assert (node_modules\typescript\lib\typescript.js:2099:23)
at Object.transpileModule (node_modules\typescript\lib\typescript.js:53173
:18)
at State.fastEmit (node_modules\awesome-typescript-loader\src\host.ts:262:
39)
at transform (node_modules\awesome-typescript-loader\src\index.ts:164:28)
at transformationFunction (node_modules\awesome-typescript-loader\src\inde
x.ts:89:48)
at compiler (node_modules\awesome-typescript-loader\src\index.ts:105:34)
at Object.loader (node_modules\awesome-typescript-loader\src\index.ts:18:1
8)
@ ./src/component.ts 12:31-83
Not critical workaround is to just change the d.ts files to ts files and transpile them to empty js files.
Metadata
Metadata
Assignees
Labels
No labels