Or am I going to have to play bundler games? sigh
ok so it looks like if i do modern webpack with modern es6 module syntax, and want to use 'import' to pull in my GLSL shaders from files during build into strings in the output JS, I have to use raw-loader -- this results in source JS that can't be run directly because the import path would not be valid in a browser.
Or, I can write my own build script that embeds text into .json, and import those.
Either way, life is terrible.
Ok, not too bad so far (but haven't yet tried building).
This *should* pull my jpegxr codec module from node_modules, and the shaders from text files as strings:
import jpegxr from 'jpegxr';
import vertexShader from 'raw-loader!./tonemap.vsh';
import fragmentShader from 'raw-loader!./tonemap.fsh';
Resulting bundle should itself have no external file dependencies, and should be freely re-bundle-able...
This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!