I recently discovered that running flutter test --platform=chrome is using DDC for compilation and isn't using the version of the compiler that is now default with flutter run and flutter drive.
The tests are still relying on require.js and use the AMD module format when running DDC. This needs to be migrated to use the library bundle format instead.
The compile step will output the correct format when BuildInfo.webEnableHotReload = true but the bootstrapping logic needs to be updated to use ddc_module_loader.js, load all of the JavaScript files on the page and run the app.
Some issues I've found so far:
host.dart.js from package:test is served and loaded on the page first but it has errors because it expects DOM elements to exist from the package:test version of index.html. (This looks like a preexisting issue that isn't related to the module system but leaves errors in the browser console and seems like a bad practice).
- The existing bootstrap doesn't declare the files that are needed to be loaded as part of the bootstrap process but we need that in the new module system.
I recently discovered that running
flutter test --platform=chromeis using DDC for compilation and isn't using the version of the compiler that is now default withflutter runandflutter drive.The tests are still relying on require.js and use the AMD module format when running DDC. This needs to be migrated to use the library bundle format instead.
The compile step will output the correct format when
BuildInfo.webEnableHotReload = truebut the bootstrapping logic needs to be updated to useddc_module_loader.js, load all of the JavaScript files on the page and run the app.Some issues I've found so far:
host.dart.jsfrom package:test is served and loaded on the page first but it has errors because it expects DOM elements to exist from the package:test version of index.html. (This looks like a preexisting issue that isn't related to the module system but leaves errors in the browser console and seems like a bad practice).