Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Reorganize CLI flags for build web #121837

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

Merged
merged 2 commits into from
Mar 3, 2023
Merged

Reorganize CLI flags for build web #121837

merged 2 commits into from
Mar 3, 2023

Conversation

kevmoo
Copy link
Contributor

@kevmoo kevmoo commented Mar 2, 2023

Group them into sections with headers

Group them into sections with headers
@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Mar 2, 2023
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@kevmoo
Copy link
Contributor Author

kevmoo commented Mar 2, 2023

Flutter web options
    --base-href                                         Overrides the href attribute of the <base> tag in web/index.html. No change is done to web/index.html file if this flag is not provided. The value has to start and end with a slash
                                                        "/". For more information: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
    --pwa-strategy                                      The caching strategy to be used by the PWA service worker.

          [none]                                        Generate a service worker with no body. This is useful for local testing or in cases where the service worker caching functionality is not desirable
          [offline-first] (default)                     Attempt to cache the application shell eagerly and then lazily cache all subsequent assets as they are loaded. When making a network request for an asset, the offline cache will be
                                                        preferred.

    --web-renderer                                      The renderer implementation to use when building for the web.

          [auto] (default)                              Use the HTML renderer on mobile devices, and CanvasKit on desktop devices.
          [canvaskit]                                   Always use the CanvasKit renderer. This renderer uses WebGL and WebAssembly to render graphics.
          [html]                                        Always use the HTML renderer. This renderer uses a combination of HTML, CSS, SVG, 2D Canvas, and WebGL.

JavaScript compilation options
    --csp                                               Disable dynamic generation of code in the generated output. This is necessary to satisfy CSP restrictions (see http://www.w3.org/TR/CSP/).
    --[no-]source-maps                                  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.
    --dart2js-optimization                              Sets the optimization level used for Dart compilation to JavaScript. Valid values range from O0 to O4.
                                                        (defaults to "O4")
    --dump-info                                         Passes "--dump-info" to the Javascript compiler which generates information about the generated code is a .js.info.json file.
    --no-frequency-based-minification                   Disables the frequency based minifier. Useful for comparing the output between builds.

Experimental options
    --wasm                                              Compile to WebAssembly rather than JavaScript.

@kevmoo kevmoo requested a review from yjbanov March 2, 2023 23:06
Copy link
Contributor

@harryterkelsen harryterkelsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kevmoo kevmoo added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 2, 2023
@auto-submit auto-submit bot merged commit a7f9ebc into master Mar 3, 2023
@auto-submit auto-submit bot deleted the web_cli_cleanup branch March 3, 2023 00:59
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 3, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 3, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants