krehak/laravel-mix-favicon

npm run production not exiting properly

Closed this issue · 3 comments

This is working great for me, with just one small issue - with this in place when I run npm run production the script doesn't exit when it's done running. When I remove .favicon() from my mix file the npm run production script exits as expected.

Here's my config:

.favicon({
	inputPath: 'src/favicon',
	inputFile: '*.{jpg,png,svg}',
	publicPath: 'web',
	output: 'built/favicon',
	dataFile: 'data/faviconData.json',
	blade: false,
	reload: false,
	debug: false,
	configPath: 'src/favicon/config/realfavicongenerator-config.json',
	cleaner: {
		use: false,
		path: null,
		timestamp: true
	}
});

Please let me know if there is anything else I can provide to help troubleshoot!

I fixed it in the latest version. Verify, if your problem was resolved, please.

After build it can take some time to finish the process (since the favicon is not generated from the external API yet). I noticed you are not using "cleaner". If you want to preserve the source file, you can do so through "cleaner.path", which will save your source file to a different location instead of generating a favicon after every production. This can speed up the production build significantly. I updated documentation, because I forget to clarify what the "cleaner.path" option means.

I can confirm that it’s now working as intended! Thank you!

Thanks for checking out :)