We have a subproject that is built separately so that it produces .js and .d.ts files. With "allowJs": true I get the following error when importing a module from it:
TS2306: File /path/to/file.js is not a module.
This can be fixed by setting entryFileCannotBeJs: true but as that is going away I think this issue must be fixed first.
I have not looked deeper into it but the feeling I get is that ts-loader prefer the .js file over the .d.ts and thus errors. Plain TypeScript have not errors with this setup.
We have a subproject that is built separately so that it produces
.jsand.d.tsfiles. With"allowJs": trueI get the following error when importing a module from it:TS2306: File /path/to/file.js is not a module.This can be fixed by setting
entryFileCannotBeJs: truebut as that is going away I think this issue must be fixed first.I have not looked deeper into it but the feeling I get is that
ts-loaderprefer the.jsfile over the.d.tsand thus errors. Plain TypeScript have not errors with this setup.