@@ -20,16 +20,20 @@ import 'platforms.dart';
2020import 'web_entrypoint_builder.dart' ;
2121
2222/// Compiles an the primary input of [buildStep] with dart2js.
23+ ///
24+ /// [onlyCompiler] indicates that Dart2JS is the only compiler enabled.
2325Future <void > bootstrapDart2Js (
2426 BuildStep buildStep,
2527 List <String > dart2JsArgs, {
2628 required bool ? nativeNullAssertions,
29+ required bool onlyCompiler,
2730 String entrypointExtension = jsEntrypointExtension,
2831}) => _resourcePool.withResource (
2932 () => _bootstrapDart2Js (
3033 buildStep,
3134 dart2JsArgs,
3235 nativeNullAssertions: nativeNullAssertions,
36+ onlyCompiler: onlyCompiler,
3337 entrypointExtension: entrypointExtension,
3438 ),
3539);
@@ -38,6 +42,7 @@ Future<void> _bootstrapDart2Js(
3842 BuildStep buildStep,
3943 List <String > dart2JsArgs, {
4044 required bool ? nativeNullAssertions,
45+ required bool onlyCompiler,
4146 required String entrypointExtension,
4247}) async {
4348 final dartEntrypointId = buildStep.inputId;
@@ -155,7 +160,11 @@ $librariesString
155160 // these as part of the archive because they already have asset nodes.
156161 await scratchSpace.copyOutput (jsOutputId, buildStep);
157162 await fixAndCopySourceMap (
158- dartEntrypointId.changeExtension (jsEntrypointSourceMapExtension),
163+ dartEntrypointId.changeExtension (
164+ onlyCompiler
165+ ? jsEntrypointSourceMapExtension
166+ : dart2jsEntrypointSourceMapExtension,
167+ ),
159168 scratchSpace,
160169 buildStep,
161170 );
0 commit comments