-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue building with Vite 5 #288
Comments
Can you share your vite config for v4.5 and v5? |
Sure thing. :) import react from '@vitejs/plugin-react-swc'
import { defineConfig } from 'vite'
import { compression } from 'vite-plugin-compression2'
import svgr from 'vite-plugin-svgr'
// https://vitejs.dev/config/
export default defineConfig({
assetsInclude: ['**/*.md'],
plugins: [
compression({
algorithm: 'gzip',
include: /\.(js|mjs|json|css|svg)$/i,
}),
react(),
svgr(),
],
}) |
I am having the same issue import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
}) |
@lewiswolf @RossKlein So you're telling me that v4.x vite works fine but v5.x is broken and you didn't change the config between versions or anything? To be honest I haven't looked into v5.x yet myself and I can only think that since its a major version change, perhaps the |
Having mostly the same issue
error happens at the same line
|
@jamesrweb I can try updating vite in my personal project that uses it to build the app including the react p5 wrapper, and reproduce the issue if possible. I will let you know tomorrow |
Sounds good @yevdyko, thank you 🙏🏻 |
@jamesrweb for me it is acceptable to use 4.5 so I downgraded vite. With no other changes p5 wrapper worked. |
…module in vite 5 ( see: P5-wrapper/react#288 (comment) )
@RossKlein @lewiswolf @yevdyko it is definitely a breaking change somewhere from Rollup / Vite. I tested upgrading Vite to v5 for this library and the same issue happens as you get also. I guess it's a "read the docs for your own project" scenario guys! |
@jamesrweb wait sorry, I don’t understand what you mean. Is this something that you can’t fix? |
Exactly, it's a Vite 5 or Rollup breaking change. Not related to this library. |
Thanks for your help everyone |
@lewiswolf I tried to upgrade my app to vite version 5 and got the same rollup build error: rollup/rollup#5259 It looks like they fixed it in rollup version 4.5.1, but it still doesn't work for me and it's definitely not related to this react component |
@yevdyko Use version 4.5.0 it works |
@RossKlein yeah, I meant that there was an attempt to fix the problem in rollup with version 4.5.1, but the previous vite version as 4.5.0 works, that's true |
FYI: I had a successful build with these versions:
|
I am getting the below error when I build my project with Vite 5. This issue was not present with Vite 4.5 however.
The text was updated successfully, but these errors were encountered: