I have been using this plugin for some time now but it doesn't seem to work with the latest mix version I recon,
it gives error -
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received function chunkFilename
at new NodeError (node:internal/errors:329:5)
at validateString (node:internal/validators:129:11)
at Object.dirname (node:path:1172:5)
at VersionHash.webpackConfig (/Users/files/node_modules/laravel-mix-versionhash/src/index.js:78:34)
at /Users/files/node_modules/laravel-mix/src/components/ComponentRegistrar.js:106:54
at /Users/files/node_modules/laravel-mix/src/Dispatcher.js:37:62
at Array.map (<anonymous>)
at Dispatcher.fire (/Users/filesnode_modules/laravel-mix/src/Dispatcher.js:37:47)
at Mix.dispatch (/Users/filees/node_modules/laravel-mix/src/Mix.js:224:32)
at WebpackConfig.build (/Users/files/node_modules/laravel-mix/src/builder/WebpackConfig.js:36:19)
at async /Users/files/node_modules/webpack-cli/lib/webpack-cli.js:1222:37
at async Promise.all (index 0)
at async evaluateConfig (/Users/files/node_modules/webpack-cli/lib/webpack-cli.js:1213:35)
at async Promise.all (index 0)
at async WebpackCLI.resolveConfig (/Users/files/node_modules/webpack-cli/lib/webpack-cli.js:1244:38)
at async WebpackCLI.createCompiler (/Users/files/node_modules/webpack-cli/lib/webpack-cli.js:1670:22) {
code: 'ERR_INVALID_ARG_TYPE'
I tried some edits to the plugin, which makes it work it's dirty but it's working for now,
Edit in index.js
changed this line 'webpackConfig.output.chunkFilename' to 'typeof webpackConfig.output.chunkFilename != "function" '
I have been using this plugin for some time now but it doesn't seem to work with the latest mix version I recon,
it gives error -
I tried some edits to the plugin, which makes it work it's dirty but it's working for now,
Edit in index.js
changed this line 'webpackConfig.output.chunkFilename' to 'typeof webpackConfig.output.chunkFilename != "function" '