From ec16c86972e57ae00d4358d3edbff035f6202214 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 15 Jul 2024 07:17:39 -0700 Subject: [PATCH] tool/build/web: move source-maps CLI flag to "general" web section (#151722) ...now that wasm supports source maps (see https://github.com/flutter/flutter/pull/151643) --- .../flutter_tools/lib/src/commands/build_web.dart | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/flutter_tools/lib/src/commands/build_web.dart b/packages/flutter_tools/lib/src/commands/build_web.dart index 913898eb3ce..24ed7e57db4 100644 --- a/packages/flutter_tools/lib/src/commands/build_web.dart +++ b/packages/flutter_tools/lib/src/commands/build_web.dart @@ -65,6 +65,12 @@ class BuildWebCommand extends BuildSubCommand { defaultsTo: '${WebCompilerConfig.kDefaultOptimizationLevel}', allowed: const ['0', '1', '2', '3', '4'], ); + argParser.addFlag( + 'source-maps', + help: 'Generate a sourcemap file. These can be used by browsers ' + 'to view and debug the original source code of a compiled and minified Dart ' + 'application.' + ); // // JavaScript compilation options @@ -75,12 +81,6 @@ class BuildWebCommand extends BuildSubCommand { help: 'Disable dynamic generation of code in the generated output. ' 'This is necessary to satisfy CSP restrictions (see http://www.w3.org/TR/CSP/).' ); - argParser.addFlag( - 'source-maps', - help: 'Generate a sourcemap file. These can be used by browsers ' - 'to view and debug the original source code of a compiled and minified Dart ' - 'application.' - ); argParser.addOption('dart2js-optimization', help: 'Sets the optimization level used for Dart compilation to JavaScript. ' 'Deprecated: Please use "-O=" / "--optimization-level=".',