webpack-4

Cannot re-export a type when using the --isolatedModules with TS 3.2.2

送分小仙女□ 提交于 2020-08-24 06:11:45
问题 I probably need to rethink the way we structure our React components. We are using the latest react-scripts that allow Typescript to be used and by default, the isolatedModules is being enabled which currently bugs me a bit. We used to structure a component like this: Component |_ Component.tsx |_ index.ts |_ types.ts Component.tsx holds the actual component without declarations index.ts is just re-exporting everything so we can have a singular entry point and can do something like import