I'm trying to bundle a package using rollup, my entrypoint is index.ts which re-exports my components, example:
// index.ts
export { default as Button } from "./components/Button"; <= .jsx file
when I run the build command, I get an error:
[!] Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
src/components/Button.jsx (1:21)
1: const Button = () => <button type="button">Click</button>;
When I change the extension of Button.jsx to Button.tsx, the error goes away.