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
Hello @m-nathani. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with need reproduction will be closed if they have no activity within 3 days.
Hii guys... i found the solution to the problem.. its not very clear in the docs.. but we cannot use .js file for jsx / react components
so any file that has jsx need to be renamed to .jsx and it worked. 😃 . Moreover, there are ways to use jsx in .js files.. but i would recommend to follow the vite build processes and use correct file formats.
Describe the bug
Was testing vite for react application.. i a styled component button and wantd to export as Library as mentioned in vite docs below
https://vitejs.dev/guide/build.html#library-mode
Reproduction
however running
vite build
it throwing theerror during build:
[rollup-plugin-dynamic-import-variables] Unexpected token (47:6) file: /home/murtaza/training/my-vue-app/src/components/UmaiButtonDemo/index.js:47:6 error during build: SyntaxError: Unexpected token (47:6) at Parser.pp$5.raise (/home/murtaza/training/my-vue-app/node_modules/rollup/dist/shared/rollup.js:19495:13)
and here is the file with the code which is mentioned in the above error
System Info
Used Package Manager
npm
Logs
Validations
The text was updated successfully, but these errors were encountered: