You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
The text was updated successfully, but these errors were encountered:
In my package I was exporting functions from the
index.ts
entry file. Even though I was using JSX in other files, theindex.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 beindex.js
, notindex.jsx
, which I didn't know there was anything wrong with until I used the package in solid-start, and saw this error: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 thesource
output. Because the source export makes sense only with JSX right?Anyway, I just thought I share it – it was confusing to figure out.
The text was updated successfully, but these errors were encountered: