Currently, I am working on a project that involves Laravel and Vuejs. As part of the process, I tried to publish my website, but I keep encountering this particular message in the browser console.
The message states that Vue is currently running in development mode, and it recommends switching to production mode when deploying for production. For additional tips, check out https://vuejs.org/guide/deployment.html
Despite running npm run prod and clearing the cache on my Chrome browser, I am still faced with the same message. Here is a snippet from my webpack.mix.js:
const mix = require('laravel-mix');
module.exports = {
mode: 'production',
resolve: {
alias: {
vue: process.env.NODE_ENV == 'production' ? 'vue/dist/vue.min.js' : 'vue/dist/vue.js'
}
}
}
mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css');
Here is an excerpt from my package.json:
"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"
Upon executing npm run prod, I received the following output:
> @ prod /var/www/html/clash
> npm run production
> @ production /var/www/html/clash
> cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no- progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
(Compiled successfully message...)
Despite following these steps, I am still confronted with the same error message. What could be the problem here?