Subhradip D.
Subhradip D.

Reputation: 49

error: Grunt :: [BABEL] Note: The code generator has deoptimised the styling of "../js/all.min.js" as it exceeds the max of "500KB". in Sail.js?

Why am I getting

error: Grunt :: [BABEL] Note: The code generator has deoptimised the styling of ".tmp/public/js/@fortawesome/fontawesome-free/js/all.min.js" as it exceeds the max of "500KB".

in Sail.js app at production mode? Please suggest me how to fix it?

Error Screenshot

Upvotes: 1

Views: 2783

Answers (1)

Subhradip D.
Subhradip D.

Reputation: 49

After many research I found that earlier babel compress max size was : 100kb. Now they have increased it to max : 500kb. But still I have that error, to fix it we have to insert a small code snippet.

In Sails JS App v.1.x - Goto

task->config->babel.js

and insert this code : compact: false inside :

dist: {
    options: {
        presets: [require('sails-hook-grunt/accessible/babel-preset-env')],
        compact: false
    },
    ...
    ....
}

Upvotes: 1

Related Questions