From a3df035babe28fd086098fea26087fd3fbca17d0 Mon Sep 17 00:00:00 2001 From: Evan You Date: Sat, 2 May 2020 23:20:46 -0400 Subject: [PATCH] refactor: upgrade vite & vue + refactor asset related logic --- package.json | 8 +- src/build/build.ts | 3 +- src/build/bundle.ts | 59 +++++------ src/build/render.ts | 21 ++-- src/server.ts | 25 ++--- yarn.lock | 232 +++++++++++++++----------------------------- 6 files changed, 129 insertions(+), 219 deletions(-) diff --git a/package.json b/package.json index f14d9749..b2da63d8 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "author": "Evan You", "license": "MIT", "dependencies": { - "@vue/compiler-sfc": "^3.0.0-beta.5", - "@vue/server-renderer": "^3.0.0-beta.5", + "@vue/compiler-sfc": "^3.0.0-beta.6", + "@vue/server-renderer": "^3.0.0-beta.6", "debug": "^4.1.1", "diacritics": "^1.3.0", "escape-html": "^1.0.3", @@ -64,8 +64,8 @@ "minimist": "^1.2.5", "prismjs": "^1.20.0", "slash": "^3.0.0", - "vite": "^0.8.1", - "vue": "^3.0.0-beta.5" + "vite": "^0.9.1", + "vue": "^3.0.0-beta.6" }, "devDependencies": { "@types/lru-cache": "^5.1.0", diff --git a/src/build/build.ts b/src/build/build.ts index d34caafe..cdf1efed 100644 --- a/src/build/build.ts +++ b/src/build/build.ts @@ -11,11 +11,12 @@ export type BuildOptions = Pick< 'root' | 'rollupInputOptions' | 'rollupOutputOptions' > +export const ASSETS_DIR = '_assets/' + export async function build(buildOptions: BuildOptions = {}) { const siteConfig = await resolveConfig(buildOptions.root) try { const [clientResult] = await bundle(siteConfig, buildOptions) - console.log('rendering pages...') for (const page of siteConfig.pages) { await renderPage(siteConfig, page, clientResult) diff --git a/src/build/bundle.ts b/src/build/bundle.ts index 844d01ca..150943ae 100644 --- a/src/build/bundle.ts +++ b/src/build/bundle.ts @@ -3,7 +3,7 @@ import slash from 'slash' import { promises as fs } from 'fs' import { APP_PATH, createResolver } from '../utils/pathResolver' import { build, BuildOptions as ViteBuildOptions, BuildResult } from 'vite' -import { BuildOptions } from './build' +import { BuildOptions, ASSETS_DIR } from './build' import { SiteConfig } from '../config' import { Plugin } from 'rollup' import { createMarkdownToVueRenderFn } from '../markdownToVue' @@ -43,82 +43,71 @@ export async function bundle( // for each .md entry chunk, adjust its name to its correct path. for (const name in bundle) { const chunk = bundle[name] - if (chunk.type === 'chunk') { - if ( - chunk.isEntry && - chunk.facadeModuleId && - chunk.facadeModuleId.endsWith('.md') - ) { - // foo/bar.md -> _assets/foo_bar.md.js - chunk.fileName = path.join( - '_assets/', - slash(path.relative(root, chunk.facadeModuleId)).replace( - /\//g, - '_' - ) + '.js' - ) - } else { - chunk.fileName = path.join('_assets/', chunk.fileName) - } + if ( + chunk.type === 'chunk' && + chunk.isEntry && + chunk.facadeModuleId && + chunk.facadeModuleId.endsWith('.md') + ) { + // foo/bar.md -> foo_bar.md.js + chunk.fileName = + slash(path.relative(root, chunk.facadeModuleId)).replace( + /\//g, + '_' + ) + '.js' } } } } // convert page files to absolute paths - const pages = config.pages.map(file => path.resolve(root, file)) + const pages = config.pages.map((file) => path.resolve(root, file)) // let rollup-plugin-vue compile .md files as well const rollupPluginVueOptions = { include: /\.(vue|md)$/ } - const sharedOptions: ViteBuildOptions = { + const clientOptions: ViteBuildOptions = { ...options, cdn: false, silent: true, resolvers: [resolver], srcRoots: [APP_PATH, config.themeDir], - cssFileName: '_assets/style.css', + outDir: config.outDir, + assetsDir: ASSETS_DIR, rollupPluginVueOptions, rollupInputOptions: { ...rollupInputOptions, input: [path.resolve(APP_PATH, 'index.js'), ...pages], plugins: [VitePressPlugin, ...(rollupInputOptions.plugins || [])] }, - rollupOutputOptions: { - ...rollupOutputOptions, - dir: config.outDir - }, + rollupOutputOptions, minify: !process.env.DEBUG } console.log('building client bundle...') - const clientResult = await build({ - ...sharedOptions, - rollupOutputOptions: { - ...rollupOutputOptions, - dir: config.outDir - } - }) + const clientResult = await build(clientOptions) console.log('building server bundle...') const serverResult = await build({ - ...sharedOptions, + ...clientOptions, + outDir: config.tempDir, rollupPluginVueOptions: { ...rollupPluginVueOptions, target: 'node' }, rollupInputOptions: { - ...sharedOptions.rollupInputOptions, + ...clientOptions.rollupInputOptions, external: ['vue', '@vue/server-renderer'] }, rollupOutputOptions: { ...rollupOutputOptions, - dir: config.tempDir, format: 'cjs', exports: 'named' }, + // server build doesn't need to emit static assets + emitAssets: false, // server build doesn't need minification minify: false }) diff --git a/src/build/render.ts b/src/build/render.ts index 79e5197a..5e011f76 100644 --- a/src/build/render.ts +++ b/src/build/render.ts @@ -4,6 +4,7 @@ import { SiteConfig, HeadConfig } from '../config' import { BuildResult } from 'vite' import { renderToString } from '@vue/server-renderer' import { OutputChunk } from 'rollup' +import { ASSETS_DIR } from './build' const escape = require('escape-html') @@ -12,7 +13,11 @@ export async function renderPage( page: string, // foo.md result: BuildResult ) { - const { createApp } = require(path.join(config.tempDir, '_assets/index.js')) + const { createApp } = require(path.join( + config.tempDir, + ASSETS_DIR, + 'index.js' + )) const { app, router } = createApp() const routePath = `/${page.replace(/\.md$/, '')}` router.go(routePath) @@ -23,14 +28,14 @@ export async function renderPage( // resolve page data so we can render head tags const { __pageData } = require(path.join( config.tempDir, - '_assets', + ASSETS_DIR, pageJsFileName )) const pageData = JSON.parse(__pageData) - const assetPath = `${config.site.base}_assets` + const assetPath = `${config.site.base}${ASSETS_DIR}` const renderScript = (file: string) => { - return `` + return `` } // resolve imports for index.js + page.md.js and inject script tags for @@ -48,7 +53,7 @@ export async function renderPage( config.site.title } - ${renderHead( + ${renderHead( config.site.head )}${renderHead(pageData.frontmatter.head)} @@ -70,11 +75,11 @@ function resolvePageImports( ) { // find the page's js chunk and inject script tags for its imports so that // they are start fetching as early as possible - const indexChunk = result.js.find( - (chunk) => chunk.type === 'chunk' && chunk.fileName === `_assets/index.js` + const indexChunk = result.assets.find( + (chunk) => chunk.type === 'chunk' && chunk.fileName === `index.js` ) as OutputChunk const srcPath = path.join(config.root, page) - const pageChunk = result.js.find( + const pageChunk = result.assets.find( (chunk) => chunk.type === 'chunk' && chunk.facadeModuleId === srcPath ) as OutputChunk return Array.from(new Set([...indexChunk.imports, ...pageChunk.imports])) diff --git a/src/server.ts b/src/server.ts index d68c3bf8..a3fc0198 100644 --- a/src/server.ts +++ b/src/server.ts @@ -12,13 +12,11 @@ import { APP_PATH, SITE_DATA_REQUEST_PATH } from './utils/pathResolver' const debug = require('debug')('vitepress:serve') const debugHmr = require('debug')('vitepress:hmr') -function createVitePressPlugin(config: SiteConfig): Plugin { - const { - themeDir, - site: initialSiteData, - resolver: vitepressResolver - } = config - +function createVitePressPlugin({ + themeDir, + configPath, + site: initialSiteData +}: SiteConfig): Plugin { return ({ app, root, watcher, resolver }) => { const markdownToVue = createMarkdownToVueRenderFn(root) @@ -72,9 +70,9 @@ function createVitePressPlugin(config: SiteConfig): Plugin { // parsing the object literal as JavaScript. let siteData = initialSiteData let stringifiedData = JSON.stringify(JSON.stringify(initialSiteData)) - watcher.add(config.configPath) + watcher.add(configPath) watcher.on('change', async (file) => { - if (file === config.configPath) { + if (file === configPath) { const newData = await resolveSiteData(root) stringifiedData = JSON.stringify(JSON.stringify(newData)) if (newData.base !== siteData.base) { @@ -126,15 +124,6 @@ function createVitePressPlugin(config: SiteConfig): Plugin { return } - // detect and serve vitepress @app / @theme files - const file = vitepressResolver.requestToFile(ctx.path, root) - if (file) { - await cachedRead(ctx, file) - debug(ctx.url, ctx.status) - await next() - return - } - await next() // serve our index.html after vite history fallback diff --git a/yarn.lock b/yarn.lock index 1b66b345..ef54a74b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -72,6 +72,13 @@ dependencies: slash "^3.0.0" +"@rollup/plugin-json@^4.0.3": + version "4.0.3" + resolved "https://registry.yarnpkg.com/@rollup/plugin-json/-/plugin-json-4.0.3.tgz#747e2c2884c5a0fa00b66c9c0f3f1012cddca534" + integrity sha512-QMUT0HZNf4CX17LMdwaslzlYHUKTYGuuk34yYIgZrNdu+pMEfqMS55gck7HEeHBKXHM4cz5Dg1OVwythDdbbuQ== + dependencies: + "@rollup/pluginutils" "^3.0.8" + "@rollup/plugin-node-resolve@^7.1.3": version "7.1.3" resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.1.3.tgz#80de384edfbd7bfc9101164910f86078151a3eca" @@ -270,71 +277,34 @@ "@types/express-serve-static-core" "*" "@types/mime" "*" -"@vue/compiler-core@3.0.0-beta.4": - version "3.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.0.0-beta.4.tgz#25cb620f3b813c80c020bbffbf44dc1fa5cb3ad2" - integrity sha512-9BQu2BqF2kUDWEfaE60Zm6EqBgS5fg5IwKLdk6WZ1k162jg7cfFklhopD+/7LY1TT9kIZ0PmRBAPrNl+8gwrzg== - dependencies: - "@babel/parser" "^7.8.6" - "@babel/types" "^7.8.6" - "@vue/shared" "3.0.0-beta.4" - estree-walker "^0.8.1" - source-map "^0.6.1" - -"@vue/compiler-core@3.0.0-beta.5": - version "3.0.0-beta.5" - resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.0.0-beta.5.tgz#5678d80876e96ae5585df1f830ffd171d4920125" - integrity sha512-8j61FHZ+CoFy4Fdzdxz3g7sTLG/YbqvqPFC8o+IKSCAbtznQ9GHvakT7bQf/umBhSxAEKYXZQpWuLvoEY527bQ== +"@vue/compiler-core@3.0.0-beta.7": + version "3.0.0-beta.7" + resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.0.0-beta.7.tgz#22767e988d941605ed21e14325e41b479f1ba97b" + integrity sha512-JDVuGzWfNdVveNambLLU7+jR+l3yRiu8TwhOLkAoaK8iAgA4J5kW/o4LYBmZgyGegpzotT7zHg8/CfsLiCNG/w== dependencies: "@babel/parser" "^7.8.6" "@babel/types" "^7.8.6" - "@vue/shared" "3.0.0-beta.5" + "@vue/shared" "3.0.0-beta.7" estree-walker "^0.8.1" source-map "^0.6.1" -"@vue/compiler-dom@3.0.0-beta.4": - version "3.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.0.0-beta.4.tgz#821569015c30376577e97c8833443a0be7f157c0" - integrity sha512-/1ICCldaRuxdWhBSiYQpWYz2SwxW3bl4sDMuI0h8iUG+IGscDtOn94y8Pt6wqrGT4sWi4KvqQTDdJVx6uOTzqg== - dependencies: - "@vue/compiler-core" "3.0.0-beta.4" - "@vue/shared" "3.0.0-beta.4" - -"@vue/compiler-dom@3.0.0-beta.5": - version "3.0.0-beta.5" - resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.0.0-beta.5.tgz#84ef01cd5052163f59276606fb37f3159e492d2e" - integrity sha512-IUR+ITbYB8n+mCx5HXNb3EsvG7hlx7mqyliwlzBuhJR3QNcy3qeanspN6pcTwHqBJ/CTE+q98ttJs+RaEgepmQ== - dependencies: - "@vue/compiler-core" "3.0.0-beta.5" - "@vue/shared" "3.0.0-beta.5" - -"@vue/compiler-sfc@^3.0.0-beta.4": - version "3.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.0.0-beta.4.tgz#057e7269effd390959b20190d30b39f3adab90e7" - integrity sha512-XTXPxU8Rr+C2UHaWd7LhFG7yM56uu1gFq3UpBDA6DC3ME7Na08j43/e/r8f3jb3vYZl4yRB1HT1UInYnnb5j8Q== +"@vue/compiler-dom@3.0.0-beta.7": + version "3.0.0-beta.7" + resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.0.0-beta.7.tgz#ba21ff6b7d8c7e2b7bbbbccd317cdcc16d31bff2" + integrity sha512-uMJrYHUNkfdOM9MkYpsfK4+Yz9OPIfi8TEupond9+kwGmQZmVC/Gw86wdnM9lMZU/eXv1S5zoYNv8PH0w3ipEw== dependencies: - "@vue/compiler-core" "3.0.0-beta.4" - "@vue/compiler-dom" "3.0.0-beta.4" - "@vue/compiler-ssr" "3.0.0-beta.4" - "@vue/shared" "3.0.0-beta.4" - consolidate "^0.15.1" - hash-sum "^2.0.0" - lru-cache "^5.1.1" - merge-source-map "^1.1.0" - postcss "^7.0.27" - postcss-modules "^2.0.0" - postcss-selector-parser "^6.0.2" - source-map "^0.6.1" + "@vue/compiler-core" "3.0.0-beta.7" + "@vue/shared" "3.0.0-beta.7" -"@vue/compiler-sfc@^3.0.0-beta.5": - version "3.0.0-beta.5" - resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.0.0-beta.5.tgz#0c79c68cb77cf5c02b07962ad120ecc6952227ad" - integrity sha512-s/GgBhh915PKi62CD3VBzLJMOJaAs2za8pyBz2rZP3BO5xPkUry8wkaZIEkypfXVOgqxIEJHaLGynEFIgl1Z3A== +"@vue/compiler-sfc@^3.0.0-beta.6", "@vue/compiler-sfc@^3.0.0-beta.7": + version "3.0.0-beta.7" + resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.0.0-beta.7.tgz#d4d6e1b60802e7f90c61c86986b366cf69bcbb61" + integrity sha512-BhDO3gzcKPt5S9UonTYvM/3WgrLWxYgEV3D40/X0aRIrCp88DCzSpKxDvTtHSdaZpCzm2HgW3E2fdGWVbCWeqg== dependencies: - "@vue/compiler-core" "3.0.0-beta.5" - "@vue/compiler-dom" "3.0.0-beta.5" - "@vue/compiler-ssr" "3.0.0-beta.5" - "@vue/shared" "3.0.0-beta.5" + "@vue/compiler-core" "3.0.0-beta.7" + "@vue/compiler-dom" "3.0.0-beta.7" + "@vue/compiler-ssr" "3.0.0-beta.7" + "@vue/shared" "3.0.0-beta.7" consolidate "^0.15.1" hash-sum "^2.0.0" lru-cache "^5.1.1" @@ -344,87 +314,50 @@ postcss-selector-parser "^6.0.2" source-map "^0.6.1" -"@vue/compiler-ssr@3.0.0-beta.4": - version "3.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.0.0-beta.4.tgz#450042913f065d0102f6c02269df03d7f1fa4193" - integrity sha512-5R3wr6P0gKT4T00MG71xtF1KDIU0UFXIPeu+qHjYx597D2ETPpi/oS7OaJqdaXdR37/89ewNZLxglhuFqUI39A== - dependencies: - "@vue/compiler-dom" "3.0.0-beta.4" - "@vue/shared" "3.0.0-beta.4" - -"@vue/compiler-ssr@3.0.0-beta.5": - version "3.0.0-beta.5" - resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.0.0-beta.5.tgz#36eb48a2be8fa95a08e28cb650d08a457026f685" - integrity sha512-rRCossujp+YfOYdishE1JNrbPjIVExXEu2yJS36BH4vGRqw9BnDYaA4gVA6ZcgjL/G/N2etYppqt7NyuRImtAQ== - dependencies: - "@vue/compiler-dom" "3.0.0-beta.5" - "@vue/shared" "3.0.0-beta.5" - -"@vue/reactivity@3.0.0-beta.4": - version "3.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.0.0-beta.4.tgz#c9b6d8442f6197d9e6ab2e6d87872dc56cadd092" - integrity sha512-1AU80//po4tUXf71xQR1XC9ldFiKx1fM/uNQcUtlhgctgRy2avqQZKbWSnY0XgbK8dQWtMpkEZoOFT+I1+IURQ== - dependencies: - "@vue/shared" "3.0.0-beta.4" - -"@vue/reactivity@3.0.0-beta.5": - version "3.0.0-beta.5" - resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.0.0-beta.5.tgz#f1edfacf1c90ebc2ef2e0d4c5b6af1fdaa86fa5d" - integrity sha512-6tvll/4F/guShcYK7cktbboHwyNLMfp/gyIUraLYutIRBTDh+OR1J1G2vC53xR22InCjPls5/tbA3eMPHkYv1Q== +"@vue/compiler-ssr@3.0.0-beta.7": + version "3.0.0-beta.7" + resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.0.0-beta.7.tgz#2fe9309c7d56bef45a374bd01bb6d38f3d57174e" + integrity sha512-TimgEJssiECdgd/YmY+zFCzu3/n3yXz2xDAPlholATls9WwPokm3Ow+FWNXwt/wWFw6NBtd8Sy9MmVKN/QzyOA== dependencies: - "@vue/shared" "3.0.0-beta.5" + "@vue/compiler-dom" "3.0.0-beta.7" + "@vue/shared" "3.0.0-beta.7" -"@vue/runtime-core@3.0.0-beta.4": - version "3.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.0.0-beta.4.tgz#13b043b6704666d902344a7a6ce0c2770c7308d9" - integrity sha512-g/WYLmsWrEkgHDIpW3Zt7e1+duxcoqi5uh4isNlpHPhhwBFfTi+ghAqf3TO7G1VOhZY6qMqgMDM/g155ibkeHw== +"@vue/reactivity@3.0.0-beta.7": + version "3.0.0-beta.7" + resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.0.0-beta.7.tgz#f936175526ac075d6f8926b424cc41425ecf2503" + integrity sha512-sCZLmuZ6kqQun9Sj7080pDhrKEW/g7Cv3vnOV82h7dWf9rKXDfw0AlNAdFIFTij3aYizrMHWDy3OtrOIpKqZbQ== dependencies: - "@vue/reactivity" "3.0.0-beta.4" - "@vue/shared" "3.0.0-beta.4" + "@vue/shared" "3.0.0-beta.7" -"@vue/runtime-core@3.0.0-beta.5": - version "3.0.0-beta.5" - resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.0.0-beta.5.tgz#9e5cf5671d74c2f48c2fabcca6b6a00bf2d7e4cf" - integrity sha512-AewCm2zfiY3TAKZhRO619TmebXuSohW8FdDtPgiKw7Dl/DrNt3s09L8g8JPNln4Y2VelfF7gtg/Y9nG98cFrGg== +"@vue/runtime-core@3.0.0-beta.7": + version "3.0.0-beta.7" + resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.0.0-beta.7.tgz#303063d03291ef4ed3d39e34cc69c8ce2498c75d" + integrity sha512-aIfxhzMCYtk0jdcvGcvEJy5xy/jB+kyAX+EsbwtAEjXvWb+TFL2sfavKGecClMTIWqcMXPhFE+uzXG3TOdo4JQ== dependencies: - "@vue/reactivity" "3.0.0-beta.5" - "@vue/shared" "3.0.0-beta.5" + "@vue/reactivity" "3.0.0-beta.7" + "@vue/shared" "3.0.0-beta.7" -"@vue/runtime-dom@3.0.0-beta.4": - version "3.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.0.0-beta.4.tgz#0cb65b919b5679983e6aa817bfe5d3662b192829" - integrity sha512-+0EOnjBIGs8YubiK871oWj9a3YwpT8dCC/rQpTmVUnISLmiGbgQk59RL2JW69yIsmDUkCRePvj06OqjbUB1Huw== +"@vue/runtime-dom@3.0.0-beta.7": + version "3.0.0-beta.7" + resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.0.0-beta.7.tgz#df32a6ab73d53cfc72f82ead7f82b259e66b262d" + integrity sha512-iphBSnQiR/VV0MHz+su90YkiUjRvS5RTdGqeX8DUemhRgk+hUv1dMLHnWiPXhyvWH5ZLZNFfq2Fi94/77L5Gcg== dependencies: - "@vue/runtime-core" "3.0.0-beta.4" - "@vue/shared" "3.0.0-beta.4" + "@vue/runtime-core" "3.0.0-beta.7" + "@vue/shared" "3.0.0-beta.7" csstype "^2.6.8" -"@vue/runtime-dom@3.0.0-beta.5": - version "3.0.0-beta.5" - resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.0.0-beta.5.tgz#44e7c28d4142e6c13dba87fce3f30a7d966f17ff" - integrity sha512-vk7W1qUR3ueQv6tv/hrroShFd4C+caoFNv8ekmzop8V3zxC2J9sAbMpc5Qmi3COGUV07z5Sgr33Ht92e2yFBNA== +"@vue/server-renderer@^3.0.0-beta.6": + version "3.0.0-beta.7" + resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.0.0-beta.7.tgz#4c7d2507c324acc4ebe5a4f845782295091056cd" + integrity sha512-wujurPgTHtO/CThFeK5cMTpMoC3VgcxSua5JX/A/eb5ITWEIMJMGP+sRuQv3i/dXpTj0Lcuy8vyDqEbSaKJ9aQ== dependencies: - "@vue/runtime-core" "3.0.0-beta.5" - "@vue/shared" "3.0.0-beta.5" - csstype "^2.6.8" - -"@vue/server-renderer@^3.0.0-beta.5": - version "3.0.0-beta.5" - resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.0.0-beta.5.tgz#dd963f9629a055cbb684b7a9e50a46983368cbfc" - integrity sha512-U57TtTiYBOLhcj7ViqDzsO2Gv87zBuZamw5ZDVBWR6XqQ6HMbqrlBuLoLzZ8NCzEwiFEEM8pi3KbQ2REzjmLzg== - dependencies: - "@vue/compiler-ssr" "3.0.0-beta.5" - "@vue/shared" "3.0.0-beta.5" - -"@vue/shared@3.0.0-beta.4": - version "3.0.0-beta.4" - resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.0.0-beta.4.tgz#2c1f18896d598549a9241641b406f0886a710494" - integrity sha512-itHxDgTzurGLiwkWc9IMPNhac0hv4mkoszGsRQclCKYmJ+Fao913i7pN3Smnl8xUYtv9Bo7EWyxmT60irN0+gg== + "@vue/compiler-ssr" "3.0.0-beta.7" + "@vue/shared" "3.0.0-beta.7" -"@vue/shared@3.0.0-beta.5": - version "3.0.0-beta.5" - resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.0.0-beta.5.tgz#44114e58b54162bdb5673049bf17adcadbad1dc3" - integrity sha512-RKMeR+yuS2HokYtkFb72YZ6EnxDiIjEXLTflLkHBp2fdEj4liHSJ3cESVtcfNOGr5sWd8w4dG2t4xloTDx24Fg== +"@vue/shared@3.0.0-beta.7": + version "3.0.0-beta.7" + resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.0.0-beta.7.tgz#63093533cdff879985777817559c1e340cb89164" + integrity sha512-denIRh2j5xCyFz4g75jLiFrcw2C7E5NoYgT0akCQI/xdYZvZ08m8rXsckAgBf1TiLehu1t3BGCc8NY7PBDGBTg== JSONStream@^1.0.4: version "1.3.5" @@ -3465,10 +3398,10 @@ rollup-plugin-terser@^5.3.0: serialize-javascript "^2.1.2" terser "^4.6.2" -rollup-plugin-vue@^6.0.0-alpha.4: - version "6.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/rollup-plugin-vue/-/rollup-plugin-vue-6.0.0-alpha.5.tgz#7da081432fcd0eaf5afa57c787b742a57bca8f60" - integrity sha512-jdHnrNVlam2TmaPoJomQIPcAkJTWag6KaO7LXpiGz5ezkKhyZWjpJvpCPsDC7I2fTtOjWBNjeZAiRcZOfCzujg== +rollup-plugin-vue@^6.0.0-alpha.7: + version "6.0.0-alpha.7" + resolved "https://registry.yarnpkg.com/rollup-plugin-vue/-/rollup-plugin-vue-6.0.0-alpha.7.tgz#178504007cbe996b24b715a4aa525614fa0feab4" + integrity sha512-hzI1aYE5GdLGMge4KDDgSoJ908wi3VbxsNP+t5nGimy/qD+hMb64hoHYH6MLvVDPLEvjU8zUTp35GO4JVCHYoQ== dependencies: debug "^4.1.1" hash-sum "^2.0.0" @@ -4110,17 +4043,18 @@ vendors@^1.0.0: resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.4.tgz#e2b800a53e7a29b93506c3cf41100d16c4c4ad8e" integrity sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w== -vite@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/vite/-/vite-0.8.0.tgz#36216e32c99c99b209704de82e9e9ff8dd69b5a1" - integrity sha512-luQqwHuS3PIXagr8mwuS5CTEgk2OKNkqIra9LnHU7zaozzqiHVjC0INDVFFCC6qGw24ohiE1wNdVAsvOCAz4vw== +vite@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/vite/-/vite-0.9.1.tgz#a35b0c032be627932246f0d4aad6da91e541e0b1" + integrity sha512-viZrY6VmpHeDpan8IRnwVJf04EZP1Kw4M30FHAS6Tr3I3B+T9cbOq9PdhLPlOyf3md29NjyMvbTgmxQOaZygMg== dependencies: "@babel/parser" "^7.9.4" "@rollup/plugin-alias" "^3.1.0" + "@rollup/plugin-json" "^4.0.3" "@rollup/plugin-node-resolve" "^7.1.3" "@rollup/plugin-replace" "^2.3.2" "@types/koa" "^2.11.3" - "@vue/compiler-sfc" "^3.0.0-beta.4" + "@vue/compiler-sfc" "^3.0.0-beta.7" chalk "^4.0.0" chokidar "^3.3.1" cssnano "^4.1.10" @@ -4130,6 +4064,7 @@ vite@^0.8.0: koa "^2.11.0" koa-conditional-get "^2.0.0" koa-etag "^3.0.0" + koa-send "^5.0.0" koa-static "^5.0.0" lru-cache "^5.1.1" magic-string "^0.25.7" @@ -4138,28 +4073,19 @@ vite@^0.8.0: resolve-from "^5.0.0" rollup "^2.7.2" rollup-plugin-terser "^5.3.0" - rollup-plugin-vue "^6.0.0-alpha.4" + rollup-plugin-vue "^6.0.0-alpha.7" slash "^3.0.0" - vue "^3.0.0-beta.4" + vue "^3.0.0-beta.7" ws "^7.2.3" -vue@^3.0.0-beta.4: - version "3.0.0-beta.4" - resolved "https://registry.yarnpkg.com/vue/-/vue-3.0.0-beta.4.tgz#f78dfefafa3f7b77404d0bf72c03ad968977a10a" - integrity sha512-HNn76qo6+Q9tuvNh9r8o0GpWTXXowECHJGUT58w/xn7kPkWa8Shs3BX6FN0GP9Q35VZNSZCBmpWtQ9FM2LGpHQ== - dependencies: - "@vue/compiler-dom" "3.0.0-beta.4" - "@vue/runtime-dom" "3.0.0-beta.4" - "@vue/shared" "3.0.0-beta.4" - -vue@^3.0.0-beta.5: - version "3.0.0-beta.5" - resolved "https://registry.yarnpkg.com/vue/-/vue-3.0.0-beta.5.tgz#ae19cb0ab73a6071122db5691f2234bdf73b21a5" - integrity sha512-Puri+Cea5hy1pjtnTN2crnwU2jI5lBBtcLHqQkHABjFi5RTQ3T2FMF2HtWfXi4UqjLK1/f+r1P05y4y+Da2sMg== +vue@^3.0.0-beta.6, vue@^3.0.0-beta.7: + version "3.0.0-beta.7" + resolved "https://registry.yarnpkg.com/vue/-/vue-3.0.0-beta.7.tgz#2f40249d585edf68b5d92794e0bc2c2ee9ba1f20" + integrity sha512-OldB4H0jhIaDNa7RNRx9YA/+NwF3PZ4EPEkE/N6FqOq2sjNR4E3r8DDmwNGsCvvzhr1A+nFgBiCn6fAkdrWCOw== dependencies: - "@vue/compiler-dom" "3.0.0-beta.5" - "@vue/runtime-dom" "3.0.0-beta.5" - "@vue/shared" "3.0.0-beta.5" + "@vue/compiler-dom" "3.0.0-beta.7" + "@vue/runtime-dom" "3.0.0-beta.7" + "@vue/shared" "3.0.0-beta.7" wcwidth@^1.0.1: version "1.0.1"