Closed Merlin04 closed 7 months ago
seems it was added in the new vite-react
release, you can just add the config in your tsconfig.json
:
"compilerOptions": {
"allowImportingTsExtensions": false
},
it was resolved by adding the config on my macos. can you provide a repro if not, thanks! 🙏
@aladdin-add turning off that setting generates the following error:
node_modules/@types/react/index.d.ts:32:1
32 export = React;
~~~~~~~~~~~~~~~
This module is declared with 'export =', and can only be used with a default import when using the 'allowSyntheticDefaultImports' flag.
to repo simply run npx dts-cli create my-lib
then try to build my-lib using npm run build
@osbornm I was not able to repro🤔.
I have pushed a new release. please provide a repro if you still encountered it, thanks! 🙏
@aladdin-add still happens using react-with-storybook option
Current Behavior
If I run
npx dts-cli create hackend-frontend
and choose to create a React library, thedts build
step at the end of the process (and running that command manually) causes this error:I tried setting
allowImportingTsExtensions
to false in both tsconfigs (library and example) but I still get that error when trying to build.Your environment