realtebo's avatar

MIX 1 WARNING in child compilations

When compiling assets, I get this

1 WARNING in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)

What doers it mean and how can I use the suggested option in laravel mix ?

0 likes
14 replies
locopump's avatar

I discovered that I have two classes with the same name and one of them was child of the another.

1 like
realtebo's avatar

The source of the problem is specific for each project, but to discover child compilation errors you can add this to webpack.mix.js

mix.webpackConfig({
    plugins: [
        ...
    ],
    resolve: {
       ...
    },
    stats: {
         children: true
    }
});

Obviously, if you do not need them, do not add plugins and resolve.

It's only to show at which level add stats

In my specific case, some of my scss was throwing a warning due to deprecation of /. I replaced all occurrencies with a multiply or with math.div

14 likes
skeith22's avatar

@realtebo where can I find this mix.webpackConfig({})? I'm currently having this issue. maybe you can guide me on how to resolve this.

I'm using Laravel Mix/Vue inside a Laravel Project folder.

1 like
realtebo's avatar

@skeith22 if not present in webpack.mix.js you can add it to the file, at the top.

if you don't have it, add only the 'stats' branch of config object

2 likes
aiMeta's avatar

Thanks you - That sorted my issue. Especially the dont add if you dont need a plugin

1 like
mehdi9500's avatar

the problem is for require('autoprefixer'), in wepack.mix.js. remove it.

realtebo's avatar

@mehdi9500 well, it's not a solution. Autoprefixer does things, and wee nedd these things.

2 likes
scanmaster's avatar
Level 3

I had 12 warnings all to do with color-adjust being deprecated and needing changed to print-color-adjust.

npm install [email protected] --save-exact

Fixes the issue.

28 likes

Please or to participate in this conversation.