Skip to content

Commit

Permalink
feat(vue2): add vti check command
Browse files Browse the repository at this point in the history
  • Loading branch information
fi3ework committed May 31, 2021
1 parent b13d00c commit de9f7f0
Show file tree
Hide file tree
Showing 18 changed files with 660 additions and 154 deletions.
2 changes: 2 additions & 0 deletions examples/vue2-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
"typescript": "~4.3.2",
"vite": "^2.0.2",
"vite-plugin-components": "^0.10.2",
"vite-plugin-ts-checker": "^0.1.3",
"vite-plugin-ts-checker-preset-vls": "^0.0.1",
"vite-plugin-vue2": "^1.2.1",
"vue-template-compiler": "^2.6.12"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/vue2-ts/src/components/HelloWorld.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<h1>{{ msg1 }}</h1>
<p>
For a guide and recipes on how to configure / customize this project,<br />
check out the
Expand Down
14 changes: 9 additions & 5 deletions examples/vue2-ts/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { defineConfig } from 'vite'
import { createVuePlugin } from 'vite-plugin-vue2'
import ViteComponents from 'vite-plugin-components'
import TsChecker from 'vite-plugin-ts-checker'
import vlsChecker from 'vite-plugin-ts-checker-preset-vls'
import { resolve } from 'path'

const config = defineConfig({
Expand All @@ -9,15 +11,17 @@ const config = defineConfig({
'@': `${resolve(__dirname, 'src')}`,
},
},

base: '/vue-template/',

build: {
minify: true,
},

plugins: [createVuePlugin({}), ViteComponents({ transformer: 'vue2' })],

plugins: [
createVuePlugin({}),
ViteComponents({ transformer: 'vue2' }),
TsChecker({
checker: vlsChecker(),
}),
],
server: {
port: 8080,
},
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
"npm-run-path": "^4.0.1",
"strip-ansi": "^6.0.0"
},
"peerDependencies": {
"vite": "^2.0.0"
},
"devDependencies": {
"@release-it/conventional-changelog": "^2.0.1",
"@types/babel__code-frame": "^7.0.2",
Expand Down
Loading

0 comments on commit de9f7f0

Please sign in to comment.