webpack hangs at on "95% emit" / "95% emitting"
I fixed by upgrading to [email protected]
So I figured this out. It turns out I was including reserved characters in my output path. I've since opened an issue on github.
When using an invalid or reserved character in the output.path webpack will hang with no output. Running with the --progress flag will show that it's hanging on 95% emit(ting) (suffix depending on webpack version).
I use laravel-mix as a standalone. This is my my config:
let mix = require('laravel-mix');
mix.setPublicPath('./')
.js('resources/js/app.js', 'js')
.sass('resources/sass/app.scss', 'css');
This worked for me.
In my case (Windows environment and laravel-mix) there weren't any incorrect characters in the path, since even a dead simple configuration didn't work. It was just webpack ([email protected]) doing something stupid of his own and the problem has been solved using publicPath
option like this:
mix.options({
publicPath: ('./')
});
which according to the documentation:
allows you to specify the base path for all the assets within your application
Alternatively you can use:
mix.setPublicPath('./');