I followed this tutorial to setup typescript+webpack (no react) with success. It all works great until I add index.d.ts file my components folder, which I use to export all my modules, like:
export * from "./MyClass1";
export * from "./MyClass2";
export * from "./MyClass2";
Then I import it:
import * as MyLib from "./components";
Code hinting and everything works fine in sublime editor.
Initially, when I run it, I've got:
Cannot resolve 'file' or 'directory' ./components
So I added d.ts to extensions in webpack.config.js:
resolve: {
extensions: ["", ".webpack.js", ".web.js", ".ts", ".tsx", ".js", ".d.ts"]
},
Now, when I run webpack, I get this error:
Typescript emitted no output for [...]\index.d.ts
How should I solve this problem?
compilerOptions.moduleResolution = "node"in tsconfig, and retry the step where it wasn't finding ./components