I followed this tutorial to install typescript + webpack (no response) with success. Everything works fine until I add the index.d.ts file to my components folder, which I use to export all my modules, for example:
export * from "./MyClass1"; export * from "./MyClass2"; export * from "./MyClass2";
Then I import it:
import * as MyLib from "./components";
Code summary and everything works fine in a sublime editor.
Initially, when I run it, I have:
Cannot resolve "file" or "directory". / components
So, I added d.ts to the extensions in webpack.config.js:
resolve: { extensions: ["", ".webpack.js", ".web.js", ".ts", ".tsx", ".js", ".d.ts"] },
Now when I start webpack, I get this error:
Typescript does not output for [...] \ index.d.ts
How do I solve this problem?
source share