[Vuejs]-Deploy vuejs&laravel 5.8 project

0👍

Your available scripts can be seen in package.json in the main laravel app folder.
There you should see something like:

"scripts": {
        "dev": "npm run development",
        "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
        "watch": "npm run development -- --watch",
        "watch-poll": "npm run watch -- --watch-poll",
        "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
        "prod": "npm run production",
        "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
    },

Use npm run production for production builds and npm run dev for development builds.

In your webpack.mix.js file in the main folder, you can define your webpack configuration and therefore deployment settings. Have a look at https://laravel.com/docs/6.x/mix for details.

If you leave the standard implementation, your resources/js/app.js will be compiled to public/js/app.js.
You can include the file in your Laravel Blade template like this:

<script src="{{ mix('js/app.js') }}"></script>.

Leave a comment