-
Hey. I'm trying out vite right now and I'm pretty excited about it. My test playground is a simple react app which uses react-three-fiber to render a simple 3D scene which just works. One special thing when dealing with 3D stuff are shaders which may be placed in its own files, beacuse they are written in GLSL and one may want to get code highlighting. In JS they are simply handled as strings. So, currently a simple Is there a way for importing file contents just as text strings? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Vite is compatible with most rollup plugins, including file loaders. Check out Awesome Rollup for a list of rollup plugins to try out. Checking the source code of these two, both should work fine https://github.com/vwochnik/rollup-plugin-glsl
https://github.com/glslify/rollup-plugin-glslify
Please report back if you find any issues, and also if they worked correctly, I am starting to add compatible community plugins to https://vite-rollup-plugins.patak.dev, and I still didn't get to these ones 👍🏼 |
Beta Was this translation helpful? Give feedback.
Vite is compatible with most rollup plugins, including file loaders. Check out Awesome Rollup for a list of rollup plugins to try out.
Checking the source code of these two, both should work fine
https://github.com/vwochnik/rollup-plugin-glsl
https://github.com/glslify/rollup-plugin-glslify
Please report back if you find any issues, and also if they worked correctly, I am starting to add compatible community plugins to https://vite-rollup-plugins.patak.dev, and I still didn't get to these ones 👍🏼