[Vuejs]-Alternative folder structure in Laravel

0👍

You don’t really need to separate them on the production server. You don’t even need the resources folder on the production server. All you need is the two separate js files in the public/assets/js folder and then in your index.blade.php file you can choose which js file to load based on the user’s role. I don’t even have node installed on any of my production servers and my app.js works just fine. Just make sure that when you compile with webpack that you run the following command:

npm run prod

Then just copy the output js file into your /project/public/assets/js folder.

Leave a comment