The plugin fails to compile jsx (react), getting this error:
[!] Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
https://repl.it/repls/CornsilkShinyRule
Install plugin-typescript and acorn-jsx as explained in the readme. Setup a react component and run rollup.
compilation succeeds
[!] Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
Thanks for opening an issue. Citing the issue template:
Issues without minimal reproductions will be closed! Please provide one by:
- Using the REPL.it plugin reproduction template at https://repl.it/@rollup/rollup-plugin-repro
- Provide a minimal repository link (Read https://git.io/fNzHA for instructions).
These may take more time to triage than the other options.- Using the REPL at https://rollupjs.org/repl/
Please add a reproduction and we'll be happy to triage further.
@shellscape https://repl.it/repls/CornsilkShinyRule
@paulrostorp if i remove outDir from your tsconfig - everything is fine
@paulrostorp if i remove outDir from your tsconfig - everything is fine
If I do that, I get the following error
(plugin typescript) Error: @rollup/plugin-typescript: 'outDir' or 'declarationDir' must be specified to generate declaration files.
I had to use https://github.com/ezolenko/rollup-plugin-typescript2 for now
@wilomgfx it's working without declarations. I'am using typescript2 too btw. It's a lot more stable for me.
Quick fix for now is to manually set your rootDir compiler option to "src". I'll keep working on fixing the default behavior.
any updates on that?
@Mordag please don't post replies asking if there are updates. if there are commits or pull requests related to the issue GitHub will display them in the thread for this issue
Hey folks. This issue hasn't received any traction for more than 90 days, so we're going to close this for housekeeping. If this is still an ongoing issue, please do consider contributing a Pull Request to resolve it. Further discussion is always welcome even with the issue closed. If anything actionable is posted in the comments, we'll consider reopening it.
Most helpful comment
If I do that, I get the following error
(plugin typescript) Error: @rollup/plugin-typescript: 'outDir' or 'declarationDir' must be specified to generate declaration files.I had to use https://github.com/ezolenko/rollup-plugin-typescript2 for now