-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
Labels
platform-webWeb applications specificallyWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-webOwned by Web platform teamOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Description
See prior discussion at #134423.
Some arguments to dart2js are specified here:
flutter/packages/flutter_tools/lib/src/web/compiler_config.dart
Lines 95 to 101 in 42ecb86
| /// Arguments to use in both phases: full JS compile and CFE-only. | |
| List<String> toSharedCommandOptions(BuildMode buildMode) => <String>[ | |
| if (nativeNullAssertions) '--native-null-assertions', | |
| if (!sourceMaps) '--no-source-maps', | |
| if (buildMode == BuildMode.debug) '--enable-asserts', | |
| '-O${optimizationLevelForBuildMode(buildMode)}', | |
| ]; |
And some are specified here:
flutter/packages/flutter_tools/lib/src/web/compiler_config.dart
Lines 114 to 124 in 42ecb86
| /// Arguments to use in the full JS compile, but not CFE-only. | |
| /// | |
| /// Includes the contents of [toSharedCommandOptions]. | |
| @override | |
| List<String> toCommandOptions(BuildMode buildMode) => <String>[ | |
| if (minify ?? buildMode == BuildMode.release) '--minify' else '--no-minify', | |
| ...toSharedCommandOptions(buildMode), | |
| if (dumpInfo) '--stage=dump-info-all', | |
| if (noFrequencyBasedMinification) '--no-frequency-based-minification', | |
| if (csp) '--csp', | |
| ]; |
This is error-prone as dart2js generally assumes its flags to be consistent across a sequential compilation (with the exception of flags like --stage which actually govern how the compilation is split up).
Metadata
Metadata
Assignees
Labels
platform-webWeb applications specificallyWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-webOwned by Web platform teamOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.