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
I have a monorepo with some files using vue-jsx, and some uing react. I set include option for both plugins. But they still seem to conflict, triggering build error.
error during build:
RollupError: [vite:build-import-analysis] [plugin vite:build-import-analysis] src/react-app/main.tsx (9:22): Failed to parse source for import analysis because the content contains invalid JS syntax. If you use tsconfig.json, make sure to not set jsx to preserve.
file: C:/Users/juju/Learn/gaga-react/src/react-app/main.tsx:9:22
7: <React.StrictMode>
8:
9: </React.StrictMode>,
^
10: )
at getRollupError (file:///C:/Users/juju/Learn/gaga-react/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/parseAst.js:376:41)
at error (file:///C:/Users/juju/Learn/gaga-react/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/parseAst.js:372:42)
at Object.error (file:///C:/Users/juju/Learn/gaga-react/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:19410:20)
at Object.error (file:///C:/Users/juju/Learn/gaga-react/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:18520:42)
at Object.transform (file:///C:/Users/juju/Learn/gaga-react/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-B8QpfTwU.js:66540:22)
Describe the bug
I have a monorepo with some files using vue-jsx, and some uing react. I set include option for both plugins. But they still seem to conflict, triggering build error.
Reproduction
https://github.com/gliheng/vite-react-and-vue
Steps to reproduce
pnpm i and open http://localhost:5173/
In vite.config.ts, plugin-vue-jsx and plugin-react only one can be enabled, not both.
System Info
Used Package Manager
pnpm
Logs
error during build:
RollupError: [vite:build-import-analysis] [plugin vite:build-import-analysis] src/react-app/main.tsx (9:22): Failed to parse source for import analysis because the content contains invalid JS syntax. If you use tsconfig.json, make sure to not set jsx to preserve.
file: C:/Users/juju/Learn/gaga-react/src/react-app/main.tsx:9:22
7: <React.StrictMode>
8:
9: </React.StrictMode>,
^
10: )
at getRollupError (file:///C:/Users/juju/Learn/gaga-react/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/parseAst.js:376:41)
at error (file:///C:/Users/juju/Learn/gaga-react/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/parseAst.js:372:42)
at Object.error (file:///C:/Users/juju/Learn/gaga-react/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:19410:20)
at Object.error (file:///C:/Users/juju/Learn/gaga-react/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:18520:42)
at Object.transform (file:///C:/Users/juju/Learn/gaga-react/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-B8QpfTwU.js:66540:22)
Validations
The text was updated successfully, but these errors were encountered: