-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
glslify updates not live reloading #216
Comments
Ouch that sounds annoying!
It looks like you are specifying glslify as a plugin to Babel right now. Instead you should pass it separately, outside the Babel subarg, as a transform.
```budo ./src/index.js:dist/bundle.js --live --open -d ./ -- -t [ babelify --presets [ es2015 react stage-0 ] ] -t glslify```
You won’t need the `./node_modules` stuff if you place the command in a local npm “start” script and call “npm run start”. Here’s an example from a past webgl project:
https://github.com/mattdesl/raylight/blob/5779f90abd7320f93f6434c16880091fdb8deddd/package.json#L83
https://github.com/mattdesl/raylight/blob/5779f90abd7320f93f6434c16880091fdb8deddd/package.json#L83
https://github.com/mattdesl/raylight/blob/5779f90abd7320f93f6434c16880091fdb8deddd/package.json#L83https://github.com/mattdesl/raylight/blob/5779f90abd7320f93f6434c16880091fdb8deddd/package.json#L83
Sent from my iPhone
… On Aug 31, 2017, at 6:11 AM, Kev Zettler ***@***.***> wrote:
I have budo running with
"./node_modules/.bin/budo ./src/index.js:dist/bundle.js --live --open -d ./ -- -t [ babelify --presets [ es2015 react stage-0 ] --plugins glslify]",
I have glsl files included like:
vert: glsl('../../shaders/aoMesh.vert'),
frag: glsl('../../shaders/aoMesh.frag')
When I modify the files budo does see the changes and trigger a reload. I have manually kill budo and restart. Really breaks the whole workflow.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
thanks, @mattdesl, unfortunately, moving
Heres the command :
|
Ah unfortunately I think it’s a bug with glslify. You have to use require() for glslify and ‘path’ module for the source transform to work. Hopefully something we can fix in glslify though. :)
I also didn’t realize it could be used as a Babel plugin - maybe there is a way with Babel plugins to fire live reloads? Might be something to investigate.
…Sent from my iPhone
On Aug 31, 2017, at 9:07 PM, Kev Zettler ***@***.***> wrote:
thanks, @mattdesl, unfortunately, moving glsify out into the transforms seems to break Babel.
/Users/kev/code/robotbones/engines/stackgl/regl-budo/src/index.js:4
import 'whatwg-fetch';
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'
budo ./src/index.js:dist/bundle.js --live --open -d ./ -- -t [ babelify --presets [ es2015 react stage-0 ]] -t glsify
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
To accomplish this I am using https://github.com/stackgl/babel-plugin-glslify Are there any other examples of budo and live reloading babel plugins? I can probably update accordingly |
I have budo running with
I have
glsl
files included like:When I modify the files budo does see the changes and trigger a reload. I have manually kill budo and restart. Really breaks the whole workflow.
The text was updated successfully, but these errors were encountered: