Anyone who is experienced to install Element UI on Laravel 5.3
http://element.eleme.io/#/en-US/component/quickstart
Can anyone please help on the steps of installing it on Laravel 5.3? I am pretty new to it and not familiar with npm. Below is what I have done so far:
npm update vue
npm i element-ui -S
package.json
{
"private": true,
"scripts": {
"prod": "gulp --production",
"dev": "gulp watch"
},
"devDependencies": {
"babel-plugin-component": "^0.8.0",
"bootstrap": "^4.0.0-alpha.5",
"gulp": "^3.9.1",
"jquery": "^3.1.0",
"laravel-elixir": "^6.0.0-11",
"laravel-elixir-vue-2": "^0.2.0",
"laravel-elixir-webpack-official": "^1.0.2",
"lodash": "^4.16.2",
"vue": "^2.0.1",
"vue-loader": "^9.5.1",
"vue-resource": "^1.0.3"
},
"dependencies": {
"element-ui": "^1.1.2",
"toastr": "^2.1.2",
"vue-html-loader": "^1.2.3",
"vue-timeago": "^3.1.2",
"vue2.x-core-image-upload": "^0.9.2"
}
}
In the component that I need to use element UI, for example:
Product-show.vue
<template>
<el-select v-model="value" placeholder="Select">
<el-option
v-for="item in options"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</template>
<script>
import 'element-ui/lib/theme-default/index.css';
import { Button, Select } from 'element-ui';
export default {
components:{
'el-button': Button,
'el-select': Select
},
data(){
return{
product:[],
productChoiceSelected:{},
productChoices:[],
img1:false,
img2:false,
img3:false,
bxslider:{},
options: [{
value: 'Option1',
label: 'Option1'
}, {
value: 'Option2',
label: 'Option2'
}, {
value: 'Option3',
label: 'Option3'
}, {
value: 'Option4',
label: 'Option4'
}, {
value: 'Option5',
label: 'Option5'
}],
value: ''
}
}
.....
.....
.....
}
</script>
This is what I imagine I should do but of course it does not work for this newbie. Can someone help please?
EDIT#1
Console Log Error:
1:1 Uncaught Error: Module parse failed: C:\xampp\htdocs\soyegg\node_modules\element-ui\lib\theme-default\index.css Unexpected character '#' (1:0)
You may need an appropriate loader to handle this file type.
| #charset "UTF-8";.el-breadcrumb:after,.el-breadcrumb:before,.el-form-item:after,.el-form-item:before,.el-form-item__content:after,.el-form-item__content:before{display:table;content:""}.el-slider__button,.el-slider__button-wrapper{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.el-alert,.el-dialog,.el-notification,.el-radio__inner,.el-switch__core{box-sizing:border-box}.el-pagination--small .arrow.disabled,.el-table td.is-hidden>*,.el-table th.is-hidden>*{visibility:hidden}.el-breadcrumb:after,.el-button-group:after,.el-form-item:after,.el-form-item__content:after,.el-menu:after,.el-pagination:after,.el-picker-panel__body-wrapper::after,.el-picker-panel__body::after,.el-row:after,.el-tabs__header:after{clear:both}.el-autocomplete__suggestions.is-loading li:after{display:inline-block;content:"";height:100%;vertical-align:middle}.el-button-group:after,.el-button-group:before{display:table;content:""}#font-face{font-family:element-icons;src:url(fonts/element-icons.eot?
........
........
........
........
l-collapse-item.is-active .el-collapse-item__header__arrow{-ms-transform:rotate(90deg);transform:rotate(90deg)}.el-collapse-item__header{height:43px;line-height:43px;padding-left:15px;background-color:#fff;color:#475669;cursor:pointer;border-bottom:1px solid #e0e6ed;font-size:13px}.el-collapse-item__header__arrow{margin-right:8px;transition:transform .3s}.el-collapse-item__wrap{will-change:height;background-color:#f9fafc;transition:height .3s cubic-bezier(.215,.61,.355,1);overflow:hidden;box-sizing:border-box;border-bottom:1px solid #e0e6ed}.el-collapse-item__content{padding:10px 15px;font-size:13px;color:#1f2d3d;line-height:1.769230769230769}
at eval (eval at <anonymous> (app.js:655), <anonymous>:1:7)
at Object.<anonymous> (app.js:655)
at __webpack_require__ (app.js:20)
at eval (eval at <anonymous> (app.js:187), <anonymous>:1:97)
at Object.<anonymous> (app.js:187)
at __webpack_require__ (app.js:20)
at eval (eval at <anonymous> (app.js:125), <anonymous>:4:19)
at Object.<anonymous> (app.js:125)
at __webpack_require__ (app.js:20)
at eval (eval at <anonymous> (app.js:273), <anonymous>:28:31)
cdn.fontawesome.com/js/stats.js:1 Font Awesome CDN reporting has been enabled
Try npm install --save-dev css-loader and npm install --save-dev style-loader
I too ran into this problem and as a workaround I copied the css from the node_modules folder and then pasted it directly into my project.
No doubt it has something to do with setting some kind of exception to allow the css-loader to parse the css from the node_modules but I didn't have time to mess with it.
Worked for me.
Related
I've been reading on the internet, all foruns and communities that are some issues with Vite+VueJS3 at the .mount("#app") point.
I am facing this exactly problem and can't figure how to fix it!
Uncaught DOMException: String contains an invalid character pointing to app.mount('#app'); at app.js.
Let's see some code:
vite.config.js
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import vue from '#vitejs/plugin-vue';
export default defineConfig({
plugins: [
laravel({
input: [
'resources/sass/app.scss',
'resources/js/app.js',
],
refresh: true,
}),
vue({
template: {
transformAssetUrls: {
base: null,
includeAbsolute: false,
},
},
}),
],
resolve: {
alias: {
'vue': 'vue/dist/vue.esm-bundler.js',
},
},
});
app.js
import { createApp } from 'vue';
import Lead from './components/Lead.vue';
import Atendimento from './components/Atendimento.vue';
const app = createApp({
components: {
Lead,
Atendimento,
render: h => h(app)
}
});
app.component('atendimento', Atendimento);
app.component('lead', Lead);
app.mount('#app');
The app.blade.php witch all Blade extends has the <div id="app"> clearerly, so there is no problem (I guess) with disposition of the script.
You can see, at vite.config.js that there are a alias pointing to the dev compiler:
resolve: {
alias: {
'vue': 'vue/dist/vue.esm-bundler.js',
},
},
Right now I am pulling all my hair out of my head!
Can anyone help me?
Thanks in advance!
Since I couldn't solve this issue, I decided to migrate from Vite to Laravel-mix and used ChatGPT to help.
Check this out:
Here are the steps to migrate from ViteJS to Laravel-mix in a Laravel project:
Install Laravel-mix by running npm install laravel-mix.
Create a new file, webpack.mix.js at the root of your project.
Copy the following code into webpack.mix.js:
const mix = require('laravel-mix');
mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css');
In your package.json file, change the scripts section from:
"scripts": {
"dev": "vite",
"build": "vite build"
}
to:
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"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"
}
Remove the vite.config.js file, since Laravel-mix uses the webpack.mix.js file to configure webpack
Remove the vite package by running `npm uninstall vite`
Test the migration by running npm run dev and verify that your JavaScript and CSS assets are being compiled as expected.
That's it! You have successfully migrated from ViteJS to Laravel-mix.
The problem for a production-build seems to be the place there the #vite is included.
Change your app.blade to this and it will work.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>How To Install Vue 3 in Laravel 9 with Vite</title>
</head>
<body>
<div id="app">
</div>
#vite(['resources/css/app.css', 'resources/js/app.js'])
</body>
</html>
As stated, the package #meforma/vue-toaster has a clear() function in the API here.
My vue and vite project setup:
main.js
import Toaster from '#meforma/vue-toaster'
app.use(Toaster, {
position: 'top',
useDefaultCss: false,
pauseOnHover: false
}).provide('toast', app.config.globalProperties.$toast)
Example.vue
<template>
<div class="view">
<div class="mt-10 flex gap-5">
<button class="btn btn-stealth" #click="showToast('default')">Default</button>
<button class="btn btn-primary" #click="showToast('primary')">Primary</button>
<button class="btn btn-success" #click="showToast('success')">Success</button>
<button class="btn btn-info" #click="showToast('info')">Info</button>
<button class="btn btn-warning" #click="showToast('warning')">Warning</button>
<button class="btn btn-danger" #click="showToast('error')">Error</button>
</div>
<div class="mt-10">
<button class="btn" #click="toast.clear">Clear Toasts</button>
<br><br>
<button class="btn" #click="clearToasts">Timeout Clear</button>
</div>
</div>
</template>
<script setup>
import { inject } from 'vue'
const toast = inject('toast')
// this works
function showToast (type) {
toast.show(`This is the ${type} type toast.`, {
type: type,
duration: false
})
}
// only works when vue-toaster is local in my projects src folder :S
function clearToasts () {
toast.clear()
}
</script>
package.json
{
"name": "test-project",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "vite --open",
"build": "vite build --out-dir dist",
"lint": "eslint src"
},
"dependencies": {
"#meforma/vue-toaster": "^1.3.0",
"#vitejs/plugin-vue": "^2.2.4",
"animate.css": "^4.1.1",
"axios": "^0.26.0",
"axios-auth-refresh": "^3.2.2",
"core-js": "^3.21.1",
"microtip": "^0.2.2",
"pinia": "^2.0.13",
"pinia-plugin-persistedstate": "^1.5.1",
"sass": "^1.49.9",
"vue": "^3.2.31",
"vue-meta": "^3.0.0-alpha.10",
"vue-router": "^4.0.13"
},
"devDependencies": {
"#tailwindcss/aspect-ratio": "^0.4.0",
"#tailwindcss/forms": "^0.5.0",
"#tailwindcss/line-clamp": "^0.3.1",
"#tailwindcss/typography": "^0.5.2",
"#vue/compiler-sfc": "^3.2.31",
"#vue/eslint-config-standard": "^6.1.0",
"autoprefixer": "^10.4.2",
"eslint": "^8.12.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-standard": "^4.1.0",
"eslint-plugin-vue": "^8.6.0",
"postcss": "^8.4.7",
"tailwindcss": "^3.0.23",
"vite": "^2.8.6"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/vue3-essential",
"#vue/standard"
],
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}
But, when I pull the package into the local src folder and import it via there, the clear works perfectly. No code changes other than moving where the code lives.
I have absolutely no idea why this is the case, if anyone has ever seen anything similar, it would be greatly appreciated.
I looked through all the code of the project github and created an issue there.
I thought it might be something to do with the event bus, but then again, it works when pulled from node_modules so hence why this is such a head scratcher for me.
Thanks!
Edit 1:
Updated code example that you can run locally to experience the same issue: https://codesandbox.io/s/vue3-toaster-test-forked-m64htx?file=/src/components/HelloWorld.vue:854-868
Specifically in the main.js, swapping where the vue-toaster is pulled in from causes the clear function to stop/start working. Clearing works when vue-toaster is located within my project /src but fails to work when pulled in from node_modules.
Edit 2:
Here is a stackblitz showing the same issue (using vite too): https://stackblitz.com/edit/vitejs-vite-uqcdgd?file=src%2Fmain.js,src%2FApp.vue
So after forking #meforma/vue-toaster, rewriting the Toaster in the composition API and changing the event bus to use mitt, even went as far as to publish it to npmjs so I could replicate everything as close as possible to how I use the package originally.... it turns out that my re-written package was having the exact same issue with Vite.
Digging in further, I noticed in my /node_modules/ there was a folder: /node_modules/.vite/deps/ which had files like: #shanehoban_vue-toaster.js... so I started googling and found out that perhaps I should exclude the package from Vite optimizations... like so:
vite.config.js
export default defineConfig({
optimizeDeps: {
exclude: [
"#meforma/vue-toaster"
]
},
....
And now, the clear... is working.
The original answer is a misunderstanding. So I edited it to follow the point of the question.
Problem
The package does NOT work when using it from node_modules.
The package does work when folks it into the project and use it directly
Reason
Vite only caches JS files from the package. We can see it in node_modules/.vite/deps/#meforma_vue-toaster.js
// The .vue file is point to original file
// node_modules/#meforma/vue-toaster/src/index.js
import Toaster2 from "/Users/admin/Work/test-projects/vite-demo-vue-plugin/node_modules/#meforma/vue-toaster/src/Toaster.vue";
// node_modules/#meforma/vue-toaster/src/api.js
import Toaster from "/Users/admin/Work/test-projects/vite-demo-vue-plugin/node_modules/#meforma/vue-toaster/src/Toaster.vue";
// The js file is cached here so Singleton pattern will breaks
// node_modules/#meforma/vue-toaster/src/helpers/event-bus.js
var Event = class {
constructor() {
this.queue = {};
}
...
}
The event-bus.js is cached in the .vite folder but the Toaster.vue file is not. So when the Toaster.vue uses the EventBus, it will call the instance from node_modules/#meforma/vue-toaster/ instead of the one in the .vite cached folder. And it breaks the Singleton pattern of the original package.
This bug might happen to any package with uncachable files mixed with JS files.
Workaround
This bug can be fixed only from the Vite side. So before Vite fixes it we need to exclude the package from the Vite cache as shanehoban's answer points out:
// vite.config.js
export default defineConfig({
optimizeDeps: {
exclude: [
"#meforma/vue-toaster"
]
},
....
Github issue
I'm trying to add Vue-Splide to my Nuxt project, after following the Vue-Splide documentation to install the plugin, and registering it as a Nuxt plugin I get the error Cannot use import statement outside a module.
nuxt.config.js
buildDir: '../functions/nuxt',
build: {
publicPath: '/public/',
vendor: [''],
extractCSS: true,
babel: {
presets: [
'#babel/preset-env'
],
plugins: [
["#babel/plugin-transform-runtime"]
]
}
},
plugins: [
{ src: '~/plugins/splide.client.js', mode: "client" }
],
splide.client.js
import Vue from 'vue';
import VueSplide from '#splidejs/vue-splide';
import '#splidejs/splide/dist/css/themes/splide-default.min.css';
Vue.use(VueSplide);
template
<splide :options="{ rewind: true }" class="banner-container">
<splide-slide class="slide" v-for="slide in slides" :key="slide.id">
<img :src="slide.imagen" :alt="slide.tombre" />
</splide-slide>
</splide>
After transpiling Vue-Splide I now get the error window is not defined, and the stacktrace shows it's happening on node_modules\#splidejs\splide\dist\js\splide.js, I tried surrounding the splide tags with <client-only></client-only>, but that didn't seem to work.
What else am I missing here?
Updating to include my dependencies
"dependencies": {
"#nuxtjs/firebase": "^7.6.1",
"#splidejs/vue-splide": "^0.3.5",
"firebase": "^8.9.1",
"isomorphic-fetch": "^3.0.0",
"nuxt": "^2.0.0"
},
"devDependencies": {
"#babel/plugin-transform-runtime": "^7.15.0",
"#babel/preset-env": "^7.15.6",
"#babel/runtime": "^7.15.4",
"#nuxtjs/tailwindcss": "^4.2.1",
"autoprefixer": "^10.4.0",
"babel-eslint": "^10.0.1",
"babel-plugin-module-resolver": "^4.1.0",
"eslint": "^4.19.1",
"eslint-friendly-formatter": "^4.0.1",
"eslint-loader": "^4.0.2",
"eslint-plugin-vue": "^7.19.1",
"firebase-tools": "^9.22.0",
"node-sass": "^6.0.1",
"postcss": "^8.3.11",
"sass-loader": "^12.3.0",
"tailwindcss": "^2.2.19"
}
The documentation of the vue-splide integration is clearly talking about Vue3 composition API.
Checking in the github issues of vue-splide, I found this one which is referencing a solution that you've linked above. Meanwhile, when trying this, those are the warnings that I do have in my CLI.
Those are also related to Vue3 (which is not compatible with Nuxt2, only Nuxt3 supports Vue3). Looking at the date of all the posts, it looks like it was matching somewhat the time-frame when Vue3 was still in a beta-limbo and probably not adopted by everybody.
At some point, I guessed that the package maybe lost some retro-compatibility with Vue2 in the next months. I then tried to install the version 0.3.5 of #splidejs/vue-splide rather than the latest one and it's working perfectly fine with it!
Here is the whole setup to have it working with Nuxt2
nuxt.config.js
plugins: [{ src: '~/plugins/splide.js', mode: 'client' }],
PS: no need for a transpile because this is not the issue at all here
/plugins/splide.js
import Vue from 'vue'
import VueSplide from '#splidejs/vue-splide'
import '#splidejs/splide/dist/css/themes/splide-default.min.css'
Vue.use(VueSplide)
/pages/index.vue
<template>
<client-only>
<Splide :options="{ rewind: true }">
<SplideSlide>
<img
src="https://images.unsplash.com/photo-1638204958375-4824be216720?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=776&q=80"
alt="Sample 1"
/>
</SplideSlide>
<SplideSlide>
<img
src="https://images.unsplash.com/photo-1638176061592-d8475d970c19?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=774&q=80"
alt="Sample 2"
/>
</SplideSlide>
</Splide>
</client-only>
</template>
It works perfectly fine
I've reported the issue in the github issue, if somebody wants to have more up-to date info or an official answer from the mantainer.
EDIT: we received a confirmation on the non retro-compatibility. Also, the usage of <client-only> is also required to prevent DOM mismatch.
Issue was caused by the configuration required for Firebase hosting if following Firebase's Server-Side Render Vue Apps with Nuxt.js video.
By removing the line buildDir: '../functions/nuxt' in the nuxt.config.js file the project runs fine locally, however, in order to deploy to Firebase you have to:
Replace publicPath: '/public/' with publicPath: '/', both in src/nuxt.config.js, and functions/index.js.
Run npm run build.
Copy the contents of src/.nuxt to functions/nuxt.
Copy the contents of src/.nuxt/dist/client and src/.nuxt/dist/server to public/.
For the moment I do not know if there's a way for vue-splide to work while building to the functions folder, as I already tried installing vue-splide on the functions project with no success.
I have a WP Site on my local dev environment. I usually use laravel-mix to convert and minify the various JS and SCSS files I have, but I want to move away from that since it's not laravel.
I tested all my configuration on a new WP site and everything seems to build properly with even the SCSS files being converted into CSS and minified.
I uninstalled laravel-mix and installed all the packages I needed to run a proper non-laravel-mix configuration.
Here is a jist of the packages in my package.json
"dependencies": {
"#popperjs/core": "^2.10.1",
"bootstrap": "^5.1.1",
"bootstrap-icons": "^1.5.0"
},
"devDependencies": {
"css-loader": "^6.2.0",
"mini-css-extract-plugin": "^2.3.0",
"node-sass": "^6.0.1",
"postcss": "^8.3.6",
"postcss-loader": "^6.1.1",
"postcss-preset-env": "^6.7.0",
"sass": "^1.41.1",
"sass-loader": "^12.1.0",
"webpack": "^5.53.0",
"webpack-cli": "^4.8.0"
},
and my webpack.mix.js
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
module.exports = {
mode: "production",
plugins: [
new MiniCssExtractPlugin({
filename: '[name].min.css'
})],
module: {
rules: [
{
test: /\.s[ac]ss$/i,
use: [
{
loader: MiniCssExtractPlugin.loader,
options: { publicPath: "" }
},
"css-loader",
"sass-loader",
"postcss-loader"
]
},
],
},
output: {
filename: '[name].min.js'
},
devtool: 'source-map',
}
And I keep getting an issue with building it as it gives me an error of:
Module parse failed: Unexpected character '#' (3:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| // #import 'node_modules/bootstrap/scss/bootstrap';
|
> #import 'scss/colors';
| #import 'scss/header';
| #import 'scss/front-page';
# ./src/index.js 3:0-22
As said up top, this is 1-to-1 with my other test site, and that runs smoothly. The only difference is that this site use to use laravel-mix while the other site only had webpack.
I've tried re-install every package; set every package as dependencies instead of devdependecies, and messed around with the webpack.mix.js itself to no avail.
It's been a few days, and I can't find any solutions. Any advice is appreciated.
The file should be called
webpack.config.js
and not
webpack.mix.js
Very amateur hour from me, but I'll answer this so that if someone has a similar issue, they can see my solution.
I'm struggling a lot with how to include Vuetify a default Vue.js project created using WebStorm. It's really to do with how the default Vue.js projects are set up in WebStorm rather than the editor itself as it seems to use an approach different to others I can find. I get errors of "Unknown custom element <v-alert>" (for example). I'm failing to find answers on how to do this because WebStorm's default set-up is different from all the how-tos I can find.
My App.vue file is as follows:
<template>
<div id="app">
<img alt="Vue logo" src="../../assets/logo.png">
<HelloWorld msg="Welcome to your Vue.js app"/>
<v-alert dismissible>Why does this show as an unknown custom element?</v-alert>
</div>
</template>
<script>
import HelloWorld from './components/HelloWorld.vue'
export default {
name: 'App',
components: {
HelloWorld,
}
}
</script>
<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>
My main.js file is as follows:
import Vue from 'vue'
import App from './App.vue'
// eslint-disable-next-line no-unused-vars
import Vuetify from "vuetify";
Vue.config.productionTip = false
new Vue({
render: h => h(App),
}).$mount('#app')
My package.json file is like so:
{
"name": "my-vue-app",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^3.6.4",
"deepmerge": "^4.2.2",
"sass": "^1.26.3",
"sass-loader": "^8.0.2",
"vue": "^2.6.11",
"vuetify": "^2.2.18"
},
"devDependencies": {
"#vue/cli-plugin-babel": "~4.2.0",
"#vue/cli-plugin-eslint": "~4.2.0",
"#vue/cli-service": "~4.2.0",
"babel-eslint": "^10.0.3",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.1.2",
"vue-template-compiler": "^2.6.11"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions"
]
}
I ran npm install vuetify which seemed to proceed correctly and I get no errors when building or serving it. But I don't know how to get my Vue app to import the Vuetify components.
All the documentation I can find talks about either instantiating the Vue app directly, which I'm not doing, or else if it talks about single component .vue files the examples all have module.exports which again, I don't have in the project built by WebStorm.
I've tried adding Vuetify as one of the imports in the script section of the App.vue and I've also tried setting Vuetify and v-alert as components in the components section of the App.vue file but can't get either to work. Thanks for any help.
I'm struggling a lot with how to include Vuetify a default Vue.js project created using Webstorm
Just follow the instructions from https://vuetifyjs.com/en/getting-started/quick-start/:
create a new project by either running vue create in terminal or using New > Project > Vue.js in IDE (use the default project setup)
in terminal, run vue add vuetify
My main.js file is as follows:
you didn't register Vuetify (Vue.use(Vuetify); if you don't like to follow the standard way (i.e. use vue add), try the instructions from https://vuetifyjs.com/en/getting-started/quick-start/#webpack-install