wessberg / rollup-plugin-ts

A TypeScript Rollup plugin that bundles declarations, respects Browserslists, and enables seamless integration with transpilers such as babel and swc
MIT License
496 stars 32 forks source link

error when meet `zustand` #207

Closed takegine closed 1 year ago

takegine commented 1 year ago

Error [RollupError]: Unexpected token (Note that you need plugins to import files that are not JavaScript) image

no error when @rollup/plugin-typescript, check it , plz

wessberg commented 1 year ago

Hi there. This is not a very helpful way to submit an issue report, as you didn't follow the steps outlined in the issue template and didn't provide anything that could help me give you a good response.

Based on the very little information you've given me, I can see that Rollup is parsing a .d.mts module, but these files are strictly ambient modules that Rollup should not attempt to parse and include in the module graph. You might need to look at the order of your Rollup plugins, the imports in your application, and the relevant documentation.

If you submit a new issue with a repro and more details, I'll be much more able to help you, and at least guide you in the right direction.