-
Notifications
You must be signed in to change notification settings - Fork 28.7k
Fix minify logic #169607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix minify logic #169607
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
It's meant to be ignored unless explicitly set. Introduced in cb3150f
@@ -38,6 +38,7 @@ sealed class WebCompilerConfig { | ||
/// Returns which target this compiler outputs (js or wasm) | ||
CompileTarget get compileTarget; | ||
final WebRendererMode renderer; | ||
List<String> toCommandOptions(BuildMode buildMode); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this abstract. It's in both implementations
@@ -130,7 +132,7 @@ class JsCompilerConfig extends WebCompilerConfig { | ||
'nativeNullAssertions': nativeNullAssertions, | ||
'noFrequencyBasedMinification': noFrequencyBasedMinification, | ||
'minify': minify, | ||
'sourceMaps': sourceMaps, | ||
WebCompilerConfig.kSourceMapsEnabled: sourceMaps, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might as well use the constants if we got 'em
@@ -181,8 +184,8 @@ class WasmCompilerConfig extends WebCompilerConfig { | ||
String get buildKey { | ||
final Map<String, dynamic> settings = <String, dynamic>{ | ||
...super._buildKeyMap, | ||
'stripWasm': stripWasm, | ||
'sourceMaps': sourceMaps, | ||
kStripWasm: stripWasm, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might as well use the constants if we got 'em
@@ -445,7 +454,7 @@ void main() { | ||
) { | ||
expect(target, isA<WebServiceWorker>()); | ||
final List<WebCompilerConfig> configs = (target as WebServiceWorker).compileConfigs; | ||
expect(configs.length, 2); | ||
expect(configs, hasLength(2)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more conventional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect this increased the flakiness of the web_tools_test. |
It's meant to be ignored unless explicitly set.
Introduced in cb3150f