This is coming together really well! I left a few pointers in the code, please feel free to ask me more if anything doesn't seem clear.
<script src="$sandboxJs" data-modules="$modulesAttr"></script>Here is an example of how we load the compiled JavaScript files in the SDK test runner. We just add them all and listen on the event signaling the loads are complete before we run main.
final options = ddc.Options.fromArguments(
argParser.parse(['--module-name=main']),
);We would likely want to replicate most of the options we are currently using here:
https://github.com/dart-lang/dart-pad/blob/d9612c185d4c45877331d5e916a288ee995c8372/pkgs/dart_services/lib/src/compiling.dart#L125-L146
Specifically those that are added in the `useNew` code path `'--modules=ddc'` and `'--canary'` are needed when you use the `LibraryBundleCompiler`.
To get hot reload working you will also need to get the newly compiled output .dill file with `'--reload-delta-kernel=...'` so it can be passed to the next generation via `'--reload-last-accepted-kernel=...'`. These can be added later though if you want to just get it loading and hot restart working first.
final compiler = ddc.ProgramCompiler(```suggestion
final compiler = ddc.LibraryBundleCompiler(
```
ddc.ModuleFormat.amd,`options.moduleFormats.single` to ensure we are matching the version we used during the compilation.
deps = [ "../../utils/ddc:ddc_stable_sdk" ]```suggestion
deps = [ "../../utils/ddc:ddc_canary_sdk" ]
```
sources = [
"$root_gen_dir/utils/ddc/stable/sdk/amd/dart_sdk.js",
"$root_gen_dir/utils/ddc/stable/sdk/amd/dart_sdk.js.map",
]```suggestion
sources = [
"$root_gen_dir/utils/ddc/canary/sdk/ddc/dart_sdk.js",
"$root_gen_dir/utils/ddc/canary/sdk/ddc/dart_sdk.js.map",
]
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |