I have moved purely type definitions into a separate file, as index.d.ts
.
However, if I run Webpack, compilation fails because \index \index.ts \index.tsx...
does not exist. These correspond to my webpack config, on resolve: { extensions: [] }
If I add .d.ts
to the extensions array however, the error becomes that file is not a module.
How should I configure this properly, without turning the .d.ts
into a plain .ts
file?
P.S. Using ts-loader