diff --git a/examples/vue/.gitignore b/examples/vue/.gitignore index ebe570995..3557e17ce 100644 --- a/examples/vue/.gitignore +++ b/examples/vue/.gitignore @@ -2,16 +2,16 @@ node_modules /dist + # local env files .env.local .env.*.local -.env -.env.build # Log files npm-debug.log* yarn-debug.log* yarn-error.log* +pnpm-debug.log* # Editor directories and files .idea diff --git a/examples/vue/.vercelignore b/examples/vue/.vercelignore deleted file mode 100644 index b43bf86b5..000000000 --- a/examples/vue/.vercelignore +++ /dev/null @@ -1 +0,0 @@ -README.md diff --git a/examples/vue/README.md b/examples/vue/README.md index fce972956..d46336374 100644 --- a/examples/vue/README.md +++ b/examples/vue/README.md @@ -1,6 +1,4 @@ -![Vue.js Logo](https://github.com/vercel/vercel/blob/main/packages/frameworks/logos/vue.svg) - -# Vue.js Example +# Vue.js This directory is a brief example of a [Vue.js](https://vuejs.org/) app that can be deployed with Vercel and zero configuration. @@ -12,18 +10,26 @@ Deploy your own Vue.js project with Vercel. _Live Example: https://vue.examples.vercel.com_ -### How We Created This Example +## Running Locally -To get started with Vue.js deployed with Vercel, you can use the [Vue CLI](https://cli.vuejs.org/guide/creating-a-project.html#vue-create) to initialize the project: - -```shell -$ vue create +``` +yarn install ``` -### Deploying From Your Terminal +#### Compile and hot-reload for development -You can deploy your new Vue.js project with a single command from your terminal using [Vercel CLI](https://vercel.com/download): - -```shell -$ vercel ``` +yarn serve +``` + +#### Compile and minify for production + +``` +yarn build +``` + +#### Lint and fix files + +``` +yarn lint +``` \ No newline at end of file diff --git a/examples/vue/babel.config.js b/examples/vue/babel.config.js index ba179669a..e9558405f 100644 --- a/examples/vue/babel.config.js +++ b/examples/vue/babel.config.js @@ -1,5 +1,5 @@ module.exports = { presets: [ - '@vue/app' + '@vue/cli-plugin-babel/preset' ] } diff --git a/examples/vue/package.json b/examples/vue/package.json index 13ee2704d..06b532a69 100644 --- a/examples/vue/package.json +++ b/examples/vue/package.json @@ -1,25 +1,22 @@ { - "name": "vue", - "version": "0.1.0", "private": true, "scripts": { "serve": "vue-cli-service serve", - "dev": "vue-cli-service serve --port $PORT", "build": "vue-cli-service build", "lint": "vue-cli-service lint" }, "dependencies": { - "core-js": "^2.6.5", - "vue": "^2.6.10" + "core-js": "^3.6.5", + "vue": "^3.0.0" }, "devDependencies": { - "@vue/cli-plugin-babel": "^3.9.0", - "@vue/cli-plugin-eslint": "^3.9.0", - "@vue/cli-service": "^3.9.0", - "babel-eslint": "^10.0.1", - "eslint": "^5.16.0", - "eslint-plugin-vue": "^5.0.0", - "vue-template-compiler": "^2.6.10" + "@vue/cli-plugin-babel": "~4.5.0", + "@vue/cli-plugin-eslint": "~4.5.0", + "@vue/cli-service": "~4.5.0", + "@vue/compiler-sfc": "^3.0.0", + "babel-eslint": "^10.1.0", + "eslint": "^6.7.2", + "eslint-plugin-vue": "^7.0.0" }, "eslintConfig": { "root": true, @@ -27,21 +24,17 @@ "node": true }, "extends": [ - "plugin:vue/essential", + "plugin:vue/vue3-essential", "eslint:recommended" ], - "rules": {}, "parserOptions": { "parser": "babel-eslint" - } - }, - "postcss": { - "plugins": { - "autoprefixer": {} - } + }, + "rules": {} }, "browserslist": [ "> 1%", - "last 2 versions" + "last 2 versions", + "not dead" ] } diff --git a/examples/vue/public/index.html b/examples/vue/public/index.html index eac2e22b5..412352865 100644 --- a/examples/vue/public/index.html +++ b/examples/vue/public/index.html @@ -5,11 +5,11 @@ - vue + <%= htmlWebpackPlugin.options.title %>
diff --git a/examples/vue/src/App.vue b/examples/vue/src/App.vue index fcc566279..591a0312d 100644 --- a/examples/vue/src/App.vue +++ b/examples/vue/src/App.vue @@ -1,15 +1,13 @@