Skip to content

Is there any way to disable minify on flutter-web release build or pass arguments to dart2js #62259

Closed

Description

@atiqsamtia

How can I disable minification for a Web release build? It is messing up my JSON conversion because of class names mismatch.

There is an option for dart2js compiler which can specify the level of minifying but I can't find any documentation on how to pass that option from flutter build.

Here you can see the option. https://dart.dev/tools/dart2js#basic-options

Activity

  1. jonahwilliams commented on Jul 26, 2020

    @jonahwilliams
    Contributor

    flutter build web --profile does not minify. Optimizations may still result in type names not being unique or appearing.

    It is messing up my JSON conversion because of class names mismatch

    Relying on class names through toString (or some other means) sounds like a huge hack, unless you are implementing the mapping yourself. I would recommend reaching out on a flutter.dev/community site to find guidance on a better approach.

  2. github-actions commented on Aug 7, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  3. locked as resolved and limited conversation to collaborators on Aug 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions