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)
This commit is contained in:
Kevin Moore 2024-07-15 07:17:39 -07:00 committed by GitHub
parent 9e88446f89
commit ec16c86972
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -65,6 +65,12 @@ class BuildWebCommand extends BuildSubCommand {
defaultsTo: '${WebCompilerConfig.kDefaultOptimizationLevel}',
allowed: const <String>['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=<level>" / "--optimization-level=<level>".',