I am working through this tutorial. I am about 40 minutes in where he is adding Vuetify and I have followed along and my code is the same as his as far as I can tell, however it seems Vuetify won't load on my end.
In the following picture, the left is what it looks like on my screen vs on the right the tutorial/ what it should look like.
Here is the relevant .vue page:
<template>
<v-layout column>
<v-flex xs6 offset-xs3>
<div class="white elevation-2">
<v-toolbar class="cyan" flat dense dark>
<v-toolbar-title>Register</v-toolbar-title>
</v-toolbar>
<div class="pl-4 pr-4 pt-2 pb-2">
<input
type="email"
name="email"
v-model="email"
placeholder="email" />
<br>
<input
type="password"
name="password"
v-model="password"
placeholder="password" />
<br>
<div class="error" v-html="error" />
<br>
<button
@click="register">
Register
</button>
</div>
</div>
</v-flex>
</v-layout>
</template>
Here is the main.js where I have imported vuetify:
import Vue from 'vue'
import App from './App'
import router from './router'
import Vuetify from 'vuetify'
import '../node_modules/vuetify/dist/vuetify.min.css'
Vue.config.productionTip = false
Vue.use(Vuetify)
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
components: { App },
template: '<App/>'
})
I'm not sure what's the issue. The vuetify.min.css file is in the location where it is imported from. npm says that vuetify is correctly installed.
vuetify.min.css
not being found? If so, please check if the path is correct. My wild guess is the../
part is wrong, depending on wheremain.js
is placed. Ifmain.js
is placed at root level, replace../
with./
and it will work. – tao