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
Vite 3.0.8 compatibility #124
Comments
Hi, i personally have not tried yet vite 3. Would you mind to prepare small repro case that i can just run? |
@btd I couldn't reproduce it on stackblitz so I created a GitHub repository It uses pnpm but I think that shouldn't matter because on my project where I encountered the problem first I use yarn. |
I had this problem the other day with another plugin after upgrade to vite 3.08. In my case, it was caused by a change in type signature that rollup uses found in 2.78: My solution for now was to pin rollup to 2.77.3 until vite can update their type defs (I believe this is planned for 3.1). Typedef changes like this should be breaking IMO |
@zmrl010 seems right, i will wait until vite 3.1. As workaround just cast to PluginOptions or pin rollup to 2.77.3 |
I looked on repro case that was provided, it seems at least npm install 2 rollups: npm ls rollup
test-rollup@0.0.0 /home/den/rollup-vite-repro
├─┬ rollup-plugin-visualizer@5.8.0
│ └── rollup@2.78.1
└─┬ vite@3.0.9
└── rollup@2.77.3 In this plugin peer dependencies is set rollup >= 2, but in some reason it seem it means take the last from rollup. In this case it appeared 2 set of types. We will see what 3.1 will bring, by idea if they will stop limit upper version it should be fixed |
I added rollup to be optional peer dependency and it seems fixed the issue (need to drop node modules and lock file) npm ls rollup
test-rollup@0.0.0 /home/den/rollup-vite-repro
├─┬ rollup-plugin-visualizer@5.8.1
│ └── rollup@2.77.3
└─┬ vite@3.0.9
└── rollup@2.77.3 deduped |
Hi
After upgrading to Vite 3.0.8 i encountered a problem.
Rollup/vite config:
Versions and OS:
Error:
If I remove "visualizer(...)" or cast it as "PluginOption" than the error goes away.
This error occurred only after upgrading from 3.0.1 to 3.0.8
Is this rollup plugin not compatible anymore with the newest version?
The text was updated successfully, but these errors were encountered: