Skip to content
New issue

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

Waring for .js instead of .isx input #6

Open
thetarnav opened this issue Apr 24, 2022 · 0 comments
Open

Waring for .js instead of .isx input #6

thetarnav opened this issue Apr 24, 2022 · 0 comments

Comments

@thetarnav
Copy link
Member

thetarnav commented Apr 24, 2022

In my package I was exporting functions from the index.ts entry file. Even though I was using JSX in other files, the index.ts had no reason to have an .tsx extension.

Hence I feed that input to the solid rollup preset like so: { input: "src/index.ts" }

This causes the entry file of dist/source to be index.js, not index.jsx, which I didn't know there was anything wrong with until I used the package in solid-start, and saw this error:

image

Now I get what's wrong, and corrected it.

But wouldn't it be nice to display some sort of a waring that the entry file should be .tsx/.jsx to generate the source output. Because the source export makes sense only with JSX right?
Anyway, I just thought I share it – it was confusing to figure out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant