The emscripten library call for glShaderSource() will insert #extension GL_OES_standard_derivatives : enable
if it detects dFdx, dFdy, or fwidth in the source. Unfortunately, that makes shaders that start with #version
crash with the following error:
ERROR: 0:2: 'version' : #version directive must occur before anything else, except for comments and white space
This error is especially confusing because the source did start with #version
.