7 months ago

Mix is compiling to empty js file

Posted 7 months ago by Torch

Laravel Mix Version: 4.0.7 Node Version 10.15.1 NPM Version 6.9.0 OS: Win 10 + Homestead


I have a problem on windows (homestead virtual, winnfsd plugin installed) that after some while, and this "while" can be 10s or 10 days, laravel mix starts to compile empty javascript file.... less to css is working OK.

Here is my webpack.mix.js

const mix = require('laravel-mix');

mix.js('resources/js/app.js', 'public/js/app.js')
   .less('resources/less/app.less', 'public/css/app.css');

Mix output

/css/app.css  78.8 KiB  /js/app  [emitted]  /js/app
  /js/app.js   357 KiB  /js/app  [emitted]  /js/app

any ideas, where the problem could be?

Edit: I just found out that when this issue happen... mix.js works only if the output .js file is smaller then 30kB... If it is larger, it compiles to file that is empty... I am very confused

When I use another filename to compile to it works from start, but then again after some while it starts to behave the same

Please sign in or create an account to participate in this conversation.