State managed wasm file loading

This doesn't preload the wasm files - they will still load only when the code editor is opened. This seemed like the simplest solution. We could refactor the useEffect functions that load the wasm files into their own hooks and move them up the tree as a future enhancement however there is probably a case against loading 30mb+ for users that aren't using the code editor.

Upstream changes are here: https://github.com/balintbrews/tailwindcss-in-browser/pull/25

This required the exports of the tailwindcss-in-browser package to be changed so the we would have more control over how and when the lightningcss-wasm was being loaded.

Otherwise it's just an addition to the uiSlice to handle the state and utilising the Spinner component to handle the loading visuals.

Tests to come - I want to get the dev approach sorted first.

Edited by Jack Taranto

Merge request reports

Loading