load css in compatible way with liteclient
%V89j+LdmjoQZy1IuSK2LPc4pdY7vUEDRR0nHEo7NgRY=.sha256
load css in compatible way with liteclient
unfortunately loading css the way you are does not work in browserify. It's gotta be able to statically detect the file names to work with brfs. In patchbay, we have a build step, but it's kinda annoying.
I think I used evalify to solve this in web-audio-school
: https://github.com/ahdinosaur/evalify
So all we'd have to do is add
{
"transform": [
["evalify", { files: [ "`styles/index.js" ] } ]
]
}
And the contents of styles/index.js would be computed on bundle rather than on require. Perfect for this kind of thing. Basically a build step, but at least it is combined with the browserify step.
oh, so this works (only) for modules that return a data structure? not quite sure how I feel about that. but it is clever
Yeah, anything that can be serialized to json.
Built with git-ssb-web