5 months ago

Can't get Vuetify 2 to work with Laravel

Posted 5 months ago by stevenh


I haven't been able to get the new version of Vuetify (which has components à-la-carte) to work with Laravel.

The problem is related to not using Vue CLI 3. From the Vuetify documentation:

"If there is a reason you are unable to utilize the Vue CLI 3 package, you can manually install the vuetify-loader through your vue.config.js or webpack config."

"Vuetify loader - Keeping track of all the components you're using can be a real chore. The vuetify-loader alleviates this pain by automatically importing all the Vuetify components you use, where you use them. This will also make code-splitting more effective, as webpack will only load the components required for that chunk to be displayed."

"Webpack installation - You can also explicitly install the loader for webpack based projects. Similar to the vue.config.js setup, you simply add the loader to your project's webpack plugins."

// webpack.config.js

const VuetifyLoaderPlugin = require('vuetify-loader/lib/plugin')

module.exports = {
  plugins: [
    new VuetifyLoaderPlugin()

How do I use this code in webpack.mix.js?

Please sign in or create an account to participate in this conversation.