ShaderCodeInliner bundled even when not used

The PR to move the shader code inliner to the base ShaderProcessor class has the effect of putting all of ShaderCodeInliner into our tree-shaken bundle, even though it’s not being used (in the WebGL case). That’s prospectively adding 20k – any chance of making that more conditional?

Oh good catch that is quite a few bytes indeed :frowning:

@Evgeni_Popov do you think we could make it an extension a bit like we do for scene so that only webgpu and native would pull it down ?

That should be possible. I will have a look as soon as possible.

1 Like

This PR should fix the problem:

2 Likes

This will be available in the next npm version 30 next week

Wonderful, thank you both!