I try to shorten my imports in typescript
from import {Hello} from \"./components/Hello\";
to import {Hello} from \"Hello\";
I think you can do this and have it work the way you describe:
resolve: {
root: [
path.resolve(__dirname),
//e.g. path.resolve(__dirname, 'src', 'components')
],
extensions: ["", ".ts", ".tsx", ".js"]
},
Then you can do import {Hello} from "Hello";
I know I do this to resolve file paths in my src/js
directory. I am not using typescript though, but I don't think it would affect the result.