So the problem that i have is that the compiled assets folder structure is different when i'm running the npm run dev.
Let's say I download the starterkit and then remove all the asset inside the assets folder and then compile the assets, the folder structure will change and lead to an error when serving the laravel.
When accessing localhost:8000/login one of the assets is not find because the compiled assets is going to wrong folder
So this assets is not found
localhost:8000/assets/js/custom/authentication/sign-in/general.js
Because the compiled result is outputing the asset to
localhost:8000/assets/resources/_keenthemes/src/js/custom/authentication/sign-in/general.js
This happend to 3rd party too, the compiled assets is going to
assets/resources/mix/vendor
instead of
assets/plugins/custom
Hi Yeremia Wijaya
Thank you. We appreciate your feedback. It seems there is an issue with the compiled assets folder structure when using npm run dev, especially on Windows.
We acknowledge the problem, and we will address it promptly. We appreciate your patience and understanding as we work to resolve this.
Thanks
so i just found out that this behaviour only happend in windows and the cause of this is the path.normalize() function
In windows when trying to do path.normalize('resources/mix/vendors/') it will come out as 'resources\mix\vendors' and that explain why the path is not replacing to 'plugins/custom/'
I add little fix using replace(/\\/g, '/') so the code will look like this
path.normalize('resources/mix/vendors/').replace(/\\/g, '/')