rollup-plugin-glsl-bundler
Rollup plugin that allows imports of glsl files. Resolves import pragma and minifies glsl code using @plutotcool/glsl-bundler.
Install
yarn add rollup-plugin-glsl-bundler --dev
import { glslBundler } from '@plutotcool/rollup-plugin-glsl-bundler'
export default {
plugins: [
glslBundler({ })
]
}
Options
interface GLSLBundlerParameters {
include?: (string | RegExp)[] | string | RegExp | null
exclude?: (string | RegExp)[] | string | RegExp | null
filter?: (id: string) => boolean
loader?: boolean
minifier?: boolean | {
renameFunctions?: boolean
renameVariables?: boolean
renameDefines?: boolean
renameStructs?: boolean
trimComments?: boolean
trimSpaces?: boolean
trimZeros?: boolean
}
transforms?: ((source: string) => Promise<string> | string)[]
}