Skip to content
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

Error during build when minifing js over 100KB #500

Open
IgnacyPawlak opened this issue Dec 22, 2023 · 0 comments
Open

Error during build when minifing js over 100KB #500

IgnacyPawlak opened this issue Dec 22, 2023 · 0 comments
Labels

Comments

@IgnacyPawlak
Copy link

When trying to minify a js that is over 100KB there is a warning from babel:

Warning [BABEL] Note: The code generator has deoptimised the styling of "path/to/file" as it exceeds the max of "100KB".

Even though its a warning, it prevents from starting an application.

To Reproduce
Steps to reproduce the behavior:

  1. Create a js file that is over 100KB
  2. Minify
  3. Add to minify on build
  4. See error

Expected behavior
There should be babel option in config that allows to change compact property to false

Additional context
It is an easy fix (Done it myself locally).
Steps to fix:
in BabelOptions.cs add:
[JsonProperty("compact")] public bool Compact { get; set; }

in BabelCompiler.cs ConstructArguments method add:
if (!options.Compact) arguments += " --compact false";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant