[web] Update build to use generated JS runtime for Dart2Wasm. (#118359)
This commit is contained in:
@@ -865,14 +865,11 @@ void main() {
|
||||
}));
|
||||
|
||||
test('wasm build copies and generates specific files', () => testbed.run(() async {
|
||||
globals.fs.file('bin/cache/dart-sdk/bin/dart2wasm_runtime.mjs')
|
||||
.createSync(recursive: true);
|
||||
globals.fs.file('bin/cache/flutter_web_sdk/canvaskit/canvaskit.wasm')
|
||||
.createSync(recursive: true);
|
||||
|
||||
await WebBuiltInAssets(globals.fs, globals.cache, true).build(environment);
|
||||
|
||||
expect(environment.outputDir.childFile('dart2wasm_runtime.mjs').existsSync(), true);
|
||||
expect(environment.outputDir.childFile('main.dart.js').existsSync(), true);
|
||||
expect(environment.outputDir.childDirectory('canvaskit')
|
||||
.childFile('canvaskit.wasm')
|
||||
|
||||
@@ -47,11 +47,11 @@ void main() {
|
||||
'web_wasm'
|
||||
));
|
||||
for (final String filename in const <String>[
|
||||
'dart2wasm_runtime.mjs',
|
||||
'flutter.js',
|
||||
'flutter_service_worker.js',
|
||||
'index.html',
|
||||
'main.dart.wasm',
|
||||
'main.dart.mjs',
|
||||
'main.dart.js',
|
||||
]) {
|
||||
expect(appBuildDir.childFile(filename), exists);
|
||||
|
||||
Reference in New Issue
Block a user