SimulatedGREG / electron-vue

An Electron & Vue.js quick start boilerplate with vue-cli scaffolding, common Vue plugins, electron-packager/electron-builder, unit/e2e testing, vue-devtools, and webpack.
https://simulatedgreg.gitbooks.io/electron-vue/content/
MIT License
15.45k stars 1.54k forks source link

Vuetify installation problem #983

Open blackw212 opened 4 years ago

blackw212 commented 4 years ago

Hi all! I have been struggling in the last days to install Vuetify on this boilerplate. Have tried all methods mentioned on their website, nothing has worked, always ending up with the error that "the component was not found, sure you registered it correctly?".

Have no screenshots or anything as i have raged out and shift deleted everything, multiple times actually. This is giving me a huge headache.

Anybody else managed to install Vuetify and have it properly function? If so, then how ?

edit: used also the Vuetify loader, a la carte, webpack...

Annotation 2020-02-11 163009

Added also Vuetify loader + whiteListed + rules in '.electron-vue/webpack.renderer.config.js' Capture

Vuetify Plugin file `// src/plugins/vuetify.js

import Vue from 'vue' import Vuetify from 'vuetify/lib' import 'vuetify/dist/vuetify.min.css'

Vue.use(Vuetify)

const opts = {}

export default new Vuetify(opts) `

main.js ` import Vue from 'vue' import axios from 'axios'

import App from './App' import router from './router' import store from './store' import Vuetify from './plugins/vuetify'

if (!process.env.IS_WEB) Vue.use(require('vue-electron')) Vue.http = Vue.prototype.$http = axios Vue.config.productionTip = false

/ eslint-disable no-new / new Vue({ components: { App }, router, store, Vuetify, template: '' }).$mount('#app') `

linker-err0r commented 4 years ago

The boilerplate is nice, but I found that the easiest way to get a Vuetify-ready electron app is to use the Vue CLI.

$ npm install -g @vue/cli
$ vue create my-project
(answer questions to add your desired components)
$ cd my-project
$ vue add electron-builder
(add and commit after every vue add as advised)
$ git add -A
$ git commit -m 'add electron-builder'
$ vue add vuetify
(add and commit)

(optional modules)
$ vue add router
$ vue add vuex
$ vue add axios

You can then bring up your app by typing npm run electron:serve. Find more plugins here.

TimOwe commented 4 years ago

the easiest way to get a Vuetify-ready electron app is to use the Vue CLI.

Worked like a charm, had been struggling to get this boilerplate to work with vuetify too.

namila007 commented 4 years ago

https://github.com/SimulatedGREG/electron-vue/issues/725#issuecomment-433509217 try this and install vuetify-loader