The rough underlying implementation is more or less done. Right now we're deciding betwen two forms, require('a.png')
vs. requireStatic('a.png')
.
- Pros: more familiar. One single
require
for assets too. - Cons: Doesn't follow the CommonJS specs. Overloads
require
.
- Pros: isn't tied to CommonJS.
- Cons: another thing to learn.
What does it return – the file contents? a URL? If the latter, I definitely think
require
is wrong; otherwise I don't have a strong opinion.