exportWasm() to export a function to wasm. This function also internally snake cases Javascript functions. It optionally can receive a namespace argument.
modifyGlobalFetch() is used to modify the browser's fetch() function. Add modifications to the fetch function here.
Dynamic imports now work. To do a dynamic import, call convertFileSrc() specifying the protocol (ie. "fetch" protocol) then await import the file.
Features:
exportWasm()
to export a function to wasm. This function also internally snake cases Javascript functions. It optionally can receive a namespace argument.modifyGlobalFetch()
is used to modify the browser's fetch() function. Add modifications to the fetch function here.Dynamic imports now work. To do a dynamic import, call
convertFileSrc()
specifying the protocol (ie. "fetch" protocol) thenawait import
the file.Reloading now can be done using Ctrl+R.
Also note that you need to add an additional
path.ts
file inside of theroutes
folder to specify where the wasm file is. See routes/README.md.Before pulling this commit, pull the engine-lib github first (theres an extra
index.ts
file added under wasm).