vite-plugin-glsl
Advanced tools
Comparing version
@@ -9,3 +9,3 @@ { | ||
"main": "./src/index.js", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"private": false, | ||
@@ -12,0 +12,0 @@ "license": "MIT", |
@@ -5,3 +5,3 @@ /** | ||
* @description Import, inline (and compress) GLSL shader files | ||
* @version 1.2.0 | ||
* @version 1.2.1 | ||
* @license MIT | ||
@@ -8,0 +8,0 @@ */ |
@@ -200,2 +200,4 @@ import { dirname, resolve, extname, posix, sep } from 'path'; | ||
if (/@(vertex|fragment)/.test(line)) line += ' '; | ||
if (line[0] === '#') { | ||
@@ -230,2 +232,3 @@ newLine && result.push('\n'); | ||
* @throws {Error} If shader chunks started a recursion loop | ||
* | ||
* @returns {string} Shader's source code without external chunks | ||
@@ -283,3 +286,3 @@ */ | ||
throw Error( | ||
throw new Error( | ||
`Recursion detected when importing '${recursiveChunk}' in '${caller}'.` | ||
@@ -286,0 +289,0 @@ ); |
25790
0.26%567
0.35%