WebGL
Shader
vite-plugin-glsl

vite-plugin-glsl

Github (opens in a new tab)

// vite.config.js
import glsl from "vite-plugin-glsl";
import { defineConfig } from "vite";
 
export default defineConfig({
  plugins: [glsl()],
});
// main.js
import fragment from './glsl/main.frag';
 
// import something
#include chunk0.frag;
#include utils/chunk1;
#include chunk2.frag;
#include ../chunk3.frag;