UstymUkhman / vite-plugin-glsl

:spider_web: Import, inline (and compress) GLSL shader files :electric_plug:
https://www.npmjs.com/package/vite-plugin-glsl
MIT License
321 stars 21 forks source link

current `vite` peerDep prevents from using the plugin with vite 4 #24

Closed abernier closed 1 year ago

abernier commented 1 year ago

since few days, vite 4 is out. Projects using vite@4, and vite-plugin-gsl will encounter this peerDep issue:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: vite-plugin-glsl@0.5.4
npm ERR! Found: vite@4.0.0
npm ERR! node_modules/vite
npm ERR!   dev vite@"^4.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer vite@"^3.0.0" from vite-plugin-glsl@0.5.4
npm ERR! node_modules/vite-plugin-glsl
npm ERR!   dev vite-plugin-glsl@"^0.5.4" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: vite@3.2.5
npm ERR! node_modules/vite
npm ERR!   peer vite@"^3.0.0" from vite-plugin-glsl@0.5.4
npm ERR!   node_modules/vite-plugin-glsl
npm ERR!     dev vite-plugin-glsl@"^0.5.4" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /home/runner/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2022-12-10T10_35_09_491Z-debug-0.log
Error: Process completed with exit code 1.

NB: FYI I tried using vite-plugin-glsl on a vite 4 project (--forceing the warning and has no issue with)...

abernier commented 1 year ago

steps to reproduce:

$ npm create vite@latest
$ cd vite-project
$ npm i

$ npm i vite-plugin-glsl
UstymUkhman commented 1 year ago

Hi @abernier, thank you so much for your contribution! ❤ I'll publish a new version on NPM with this support for vite^4.0 asap. Please consider smashing a ⭐if you've found this plugin useful to your purposes, thanks!