Skip to content
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

Open
kevzettler opened this issue Aug 31, 2017 · 4 comments
Open

glslify updates not live reloading #216

kevzettler opened this issue Aug 31, 2017 · 4 comments

Comments

@kevzettler
Copy link

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.

@mattdesl
Copy link
Owner

mattdesl commented Aug 31, 2017 via email

@kevzettler
Copy link
Author

kevzettler commented Aug 31, 2017

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'

Heres the command :

budo ./src/index.js:dist/bundle.js --live --open -d ./ -- -t [ babelify --presets [ es2015 react stage-0 ]] -t glsify

@mattdesl
Copy link
Owner

mattdesl commented Aug 31, 2017 via email

@kevzettler
Copy link
Author

kevzettler commented Aug 31, 2017

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.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants