Get 2024 Templates Mega Bundle!$1000 worth of 19 Bootstrap HTML, Vue & React Templates + 3 Vector Sets for just $99
Get for 99$

Metronic Laravel Starterkit Different Folder Structure In Assets


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


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (2)


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, '/')


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(