bump vite, remove no longer needed watch logic

pull/27/head
Evan You 5 years ago
parent 9a795389b9
commit bad7b4a33a

@ -70,7 +70,7 @@
"minimist": "^1.2.5",
"prismjs": "^1.20.0",
"slash": "^3.0.0",
"vite": "^0.18.0",
"vite": "^0.19.0",
"vue": "^3.0.0-beta.14"
},
"devDependencies": {

@ -13,24 +13,12 @@ const debug = require('debug')('vitepress:serve')
const debugHmr = require('debug')('vitepress:hmr')
function createVitePressPlugin({
themeDir,
configPath,
site: initialSiteData
}: SiteConfig): ServerPlugin {
return ({ app, root, watcher, resolver }) => {
const markdownToVue = createMarkdownToVueRenderFn(root)
// watch vitepress container app (only when developing vitepress itself)
if (process.env.VITEPRESS_DEV) {
watcher.add(APP_PATH)
}
// watch theme files if it's outside of project root
if (path.relative(root, themeDir).startsWith('..')) {
debugHmr(`watching theme dir outside of project root: ${themeDir}`)
watcher.add(themeDir)
}
// hot reload .md files as .vue files
watcher.on('change', async (file) => {
if (file.endsWith('.md')) {

@ -559,6 +559,11 @@ buffer-from@^1.0.0:
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==
builtin-modules@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=
builtin-modules@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.1.0.tgz#aad97c15131eb76b65b50ef208e7584cd76a7484"
@ -2204,6 +2209,13 @@ isarray@~1.0.0:
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
isbuiltin@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/isbuiltin/-/isbuiltin-1.0.0.tgz#4453b2915690cb47c0cb9c9255a0807778315c96"
integrity sha1-RFOykVaQy0fAy5ySVaCAd3gxXJY=
dependencies:
builtin-modules "^1.1.1"
isexe@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
@ -3190,6 +3202,16 @@ postcss-discard-overridden@^4.0.1:
dependencies:
postcss "^7.0.0"
postcss-import@^12.0.1:
version "12.0.1"
resolved "https://registry.yarnpkg.com/postcss-import/-/postcss-import-12.0.1.tgz#cf8c7ab0b5ccab5649024536e565f841928b7153"
integrity sha512-3Gti33dmCjyKBgimqGxL3vcV8w9+bsHwO5UrBawp796+jdardbcFl4RP5w/76BwNL7aGzpKstIfF9I+kdE8pTw==
dependencies:
postcss "^7.0.1"
postcss-value-parser "^3.2.3"
read-cache "^1.0.0"
resolve "^1.1.7"
postcss-load-config@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-2.1.0.tgz#c84d692b7bb7b41ddced94ee62e8ab31b417b003"
@ -3449,7 +3471,7 @@ postcss-unique-selectors@^4.0.1:
postcss "^7.0.0"
uniqs "^2.0.0"
postcss-value-parser@^3.0.0:
postcss-value-parser@^3.0.0, postcss-value-parser@^3.2.3:
version "3.3.1"
resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281"
integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==
@ -3535,6 +3557,13 @@ quick-lru@^1.0.0:
resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8"
integrity sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=
read-cache@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774"
integrity sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=
dependencies:
pify "^2.3.0"
read-pkg-up@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02"
@ -3685,7 +3714,7 @@ resolve-path@^1.4.0:
http-errors "~1.6.2"
path-is-absolute "1.0.1"
resolve@^1.10.0, resolve@^1.11.0, resolve@^1.14.2, resolve@^1.17.0:
resolve@^1.1.7, resolve@^1.10.0, resolve@^1.11.0, resolve@^1.14.2, resolve@^1.17.0:
version "1.17.0"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444"
integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==
@ -4395,10 +4424,10 @@ vendors@^1.0.0:
resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.4.tgz#e2b800a53e7a29b93506c3cf41100d16c4c4ad8e"
integrity sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w==
vite@^0.18.0:
version "0.18.0"
resolved "https://registry.yarnpkg.com/vite/-/vite-0.18.0.tgz#91ba61db057f95334323bd808abd9e04c8d3717d"
integrity sha512-oOtfkHDRwuMeLD03m3Y0NNFLaiPu1s+mhPFPSfK3Tdb37Y9A6x8gj8283yCvIzK04ajlLbjv3ugtibpFnE6smA==
vite@^0.19.0:
version "0.19.0"
resolved "https://registry.yarnpkg.com/vite/-/vite-0.19.0.tgz#7fbf79f606481ca7300b4c894fc03e8a81d87909"
integrity sha512-gq3W3afKN9UxSX2V9hT+aJlCz1stDD4vnWirbaiCZrIm5gKrXU4ExOGfzAD9f4S1LWgsh/8zLW9Ltny0z0StYQ==
dependencies:
"@babel/parser" "^7.9.4"
"@rollup/plugin-commonjs" "^12.0.0"
@ -4420,6 +4449,7 @@ vite@^0.18.0:
execa "^4.0.1"
fs-extra "^9.0.0"
hash-sum "^2.0.0"
isbuiltin "^1.0.0"
koa "^2.11.0"
koa-conditional-get "^2.0.0"
koa-etag "^3.0.0"
@ -4433,6 +4463,7 @@ vite@^0.18.0:
open "^7.0.3"
ora "^4.0.4"
postcss "^7.0.28"
postcss-import "^12.0.1"
postcss-load-config "^2.1.0"
postcss-modules "^2.0.0"
resolve "^1.17.0"

Loading…
Cancel
Save