This will generate a Laravel Mix compatible manifest, this is convenient if you are not using Laravel Mix but still want to use the mix helper in Laravel.
using npm
npm install @devlop-ab/laravel-mix-manifest-webpack-plugin
// in webpack.config.js
const LaravelMixManifestWebpackPlugin = require('@devlop-ab/laravel-mix-manifest-webpack-plugin');
// then add to plugins array in config
module.exports = {
plugins: [
new LaravelMixManifestWebpackPlugin({
// the path to the public root
public: path.resolve(__dirname, 'public'),
// the name of the output file
name: 'mix-manifest.json',
}),
],
}