I have multiple files in the resources/js folder, with a structure like this:
.
├── commons.js
├── foo
| ├── foo1.js
| └── goo2.js
├── bar
| ├── ram1.js
| └── ram2.js
├── gopher
| ├── for1.js
| └── for2.js
How do I compile all these using Laravel-Mix, and output with the same file structure? The file structure would essentially look the same, but minified. The reason why I want to do this is because some files, like foo1.js, has stuff like this:
$(document).ready(function(){
// commands that are only for this page
});
that would get evoked on every page, so I'm importing different files for different pages so that only certain pages would run $(document).ready() functions.