Jackson Gardner 76caabd2c4 Reland (x2) "Output .js files as ES6 modules. (flutter#52023)" (flutter/engine#53718)
Second attempt to reland https://github.com/flutter/engine/pull/52023

Fixes since the previous reland attempt:
* We need to pass the skwasm main JS URI when loading the module so that it can pass that along to the worker. Since the worker uses the workaround to allow a cross script worker, it has trouble locating the main JS URI in relation to itself in a way that actually works for dynamic imports, so passing it along fixes that issue.
* Some of the Google3 tests relied on the relative default canvaskit path. Dynamic module imports seems to not handle relative paths the way we expect, so we do our own URL resolution using the URL constructor before passing it into the dynamic import API. Also cleaned up some of the other relative pathing stuff that we do around the base URI. in flutter.js
2024-07-10 16:19:28 +00:00
..