superframe icon indicating copy to clipboard operation
superframe copied to clipboard

browserify + browserify-shader isn't parsing glsl files

Open cjroth opened this issue 9 years ago • 0 comments

I'm trying to use browserify with browserify-shader:

browserify -t [ browserify-shader ] public/packages.js

or

browserify -t [ browserify-shader --parameterize=true ] public/packages.js

And that yields this error:

node_modules/aframe-sun-sky/shaders/vertex.glsl:1
varying vec3 vWorldPosition;
        ^
ParseError: Unexpected token

I'm using Browserify 13.1.1.

It looks like webpack might be the preferred packaging tool here, but I figure it would be good if this could work with browserify too since that's a fairly common tool.

I'm not sure if this is an issue with browserify-shader or vertex.glsl (I don't know much about glsl yet), so I also opened an issue with them https://github.com/mere/browserify-shader/issues/7

Side note.... it would be great to add instructions for how to package this with browserify.

cjroth avatar Nov 29 '16 15:11 cjroth