Repository navigation
Replies: 1 comment
|
I can reproduce this with the lockfile in Your import { defineConfig, transformWithEsbuild } from 'vite';
// Add before react() in plugins:
{
name: 'dependency-jsx',
enforce: 'pre',
async transform(code, id) {
if (!/node_modules\/(react-native-gifted-chat|react-native-lightbox-v2|react-native-parsed-text|react-native-typing-animation)\/.*\.js$/.test(id)) return;
return transformWithEsbuild(code, id, {
loader: 'jsx',
jsx: 'automatic'
});
}
}The other packages are included because the locked project hits their JSX after the first error is removed. Also put your existing This removes the reported JSX error, but it does not make the entire checked-in project build successfully. The next distinct error in my run is that References: Vite 4 dependency optimization and plugin ordering. |
Uh oh!
There was an error while loading. Please reload this page.
Hi all,
Stuck on this issue where I'm not able to build a vite project for production as rollup is throwing an error
Unexpected token. Is anyone able to help me configure thebuildorbuild.rollupOptionsin vite to accomplish this?Repo link with behaviour - https://github.com/omonk/vite-gifted
All reactions