0

I'm trying to use Vue on my laravel project. And import vuetify for that project.

But it appends all css inline on the project.

My app.js is avobe:

window.Vue = require('vue');

//import Vuetify from 'vuetify'
import VueRouter from 'vue-router'
import {store} from './store/store'

import vuetify from './plugins/vuetify' // path to vuetify export
import 'vuetify/dist/vuetify.min.css' // Ensure you are using css-loader



import Master from './Master'
import router from './router'

Vue.use(VueRouter)


Vue.config.productionTip = false;
router.beforeEach((to, from, next) => {
    if(to.matched.some(record => record.meta.requiresAuth)){
        if(store.getters.loggedIn){
            next()
        }else{
            next({name: 'login'})
        }
    }else{
        if(store.getters.loggedIn){
            next({name: 'dashboard'})
        }else{
            next()
        }
    }

})
// use the plugin

const app = new Vue({
    el: '#app',
    router: router,
    store: store,
    vuetify,
    components: {Master},
    template: "<Master />"
});

My webpack.mix.js:

mix.js('resources/js/app.js', 'public/js')
    .sass('resources/sass/app.scss', 'public/css');

And here's the how code compiles itself:

How can I use vuetify codes on "blabla.css" file?

enter image description here

2
  • what do you mean of use vuetify codes in blabla.css ? Commented Jan 25, 2020 at 14:29
  • i just want to compile all css inside a file, not inline html. Commented Jan 25, 2020 at 14:43

1 Answer 1

1

remove your vuetify.min.css in your app.js

and move that in your app.scss like this

@import '~vuetify/dist/vuetify.min.css';
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.