Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Laravel Mix (Webpack) Not Compile to widgets.js


Hello, I ran into an interesting problem. I am using the latest version of Metronic and working with Demo 1 Laravel. I wanted to create a widget of my own, and I tried to register it on widget.js. The path to the file is demo1/js/custom/widgets.js. However, I could not compile the code I wrote with the npm run dev/build/watch commands. I do not encounter any errors during the compilation. I haven't made any changes to any of the files anyway.

A little note: Intro.js and landing.js are compiled in the same folder. Widgets.js occurs in the build target path but is always by default.

I tried:
- I deleted node_modules and reinstalled everything with the npm install command. The problem is not solved.
- I deleted node_modules and installed the packages with yarn, not npm. Again, the problem is not solved.
- I downloaded the theme from Envato and installed it from scratch, but the problem was not solved.
- I tried to change the elements under the core folder, but it didn't affect anything.

What should I do?


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (4)


Hi Islam Saka.

Sorry for the delay. The widgets.js file is being overridden by this file;
resources/assets/extended/js/custom/widgets.js

If you want to create your own custom js, please create js files in the resources/assets/extended/js/custom/*

This will override assets from the demo folder.

Thanks



Thanks, Faizal, it's working now! happy



Your welcome. Feel free to let us know if you need any help happy



Ex. I want to compile this arrangement and follow it with the watch command in its simplest form.


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(