-
-
Notifications
You must be signed in to change notification settings - Fork 252
Open
Description
Cannot use import statement outside a module when using with react-router (vite)
Hi,
I'm trying to use react-textarea-autosize with react-router using vite, but I'm getting the following error:
Cannot use import statement outside a module
Steps to Reproduce:
- Setup a React project with Vite and react-router.
- Import and use
react-textarea-autosize.
Expected Behavior:
The component should render without errors when imported.
Actual Behavior:
I receive the error mentioned above.
I tried the recommended fix from Remix ESM/CJS, but none of these solutions resolved the issue.
Reproduction Link:
Here's a minimal reproduction in Codesandbox: https://codesandbox.io/p/devbox/j9dp2j
Thanks for your help!
Luj8n and Datlyfe
Metadata
Metadata
Assignees
Labels
No labels