Skip to content

Commit 8637cbe

Browse files
mkustermannCommit Queue
authored and
Commit Queue
committed
[dart2wasm] Allow package:ui/* to import dart:_wasm
Change-Id: I4fc17b992db272d6154a7c58fc1f4229c5368ee4 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325620 Reviewed-by: Jackson Gardner <[email protected]> Auto-Submit: Martin Kustermann <[email protected]> Commit-Queue: Martin Kustermann <[email protected]> Commit-Queue: Jackson Gardner <[email protected]>
1 parent 07c5092 commit 8637cbe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/dart2wasm/lib/target.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,10 @@ class WasmTarget extends Target {
186186
bool allowPlatformPrivateLibraryAccess(Uri importer, Uri imported) =>
187187
super.allowPlatformPrivateLibraryAccess(importer, imported) ||
188188
importer.path.contains('tests/web/wasm') ||
189-
importer.isScheme('package') && importer.path == 'js/js.dart';
189+
importer.isScheme('package') &&
190+
(importer.path == 'js/js.dart' ||
191+
importer.path.startsWith('ui/') &&
192+
imported.toString() == 'dart:_wasm');
190193

191194
void _patchHostEndian(CoreTypes coreTypes) {
192195
// Fix Endian.host to be a const field equal to Endian.little instead of

0 commit comments

Comments
 (0)