We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scanImportsFromDir
subdir/index.{tsx|jsx}
v3.7.1
v18.16.1
https://github.com/aklinker1/unimport-tsx-bug
pnpm i node index.mjs
When components/index.ts exports a subdirectory with a index.tsx file in it, an error is throw (see logs below).
components/index.ts
index.tsx
https://github.com/aklinker1/unimport-tsx-bug/blob/56985dab7724fae0c3e28f3801d6b3297bb2eed3/components/index.ts#L1
Same error is thrown if the file is components/Iframe/index.jsx.
components/Iframe/index.jsx
There is a work-around, change the export in components/index.ts:
-export * from "./Iframe"; +export * from "./Iframe/index.tsx";
This issue originates from: wxt-dev/wxt#440
I did some research into this and it appears we just need to add "tsx" and "jsx" to the file extensions array?
"tsx"
"jsx"
unimport/src/scan-dirs.ts
Lines 41 to 48 in 8a622c9
#229 fixed this for non-JSX files.
$ node index.mjs node:internal/process/esm_loader:97 internalBinding('errors').triggerUncaughtException( ^ [Error: EISDIR: illegal operation on a directory, read] { errno: -21, code: 'EISDIR', syscall: 'read' } Node.js v18.16.1
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Environment
v3.7.1
v18.16.1
Reproduction
https://github.com/aklinker1/unimport-tsx-bug
Describe the bug
When
components/index.ts
exports a subdirectory with aindex.tsx
file in it, an error is throw (see logs below).https://github.com/aklinker1/unimport-tsx-bug/blob/56985dab7724fae0c3e28f3801d6b3297bb2eed3/components/index.ts#L1
Same error is thrown if the file is
components/Iframe/index.jsx
.There is a work-around, change the export in
components/index.ts
:Additional context
This issue originates from: wxt-dev/wxt#440
I did some research into this and it appears we just need to add
"tsx"
and"jsx"
to the file extensions array?unimport/src/scan-dirs.ts
Lines 41 to 48 in 8a622c9
#229 fixed this for non-JSX files.
Logs
The text was updated successfully, but these errors were encountered: