From bc4175e79b6678e382179eb56d452b4ea21f1ee1 Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 12 Oct 2021 19:28:07 +0800 Subject: [PATCH] fix(@vant/cli): missing dev server urls (#9667) * fix(@vant/cli): missing dev server urls * chore: update lock * chore: update log --- packages/vant-cli/src/compiler/compile-site.ts | 6 ++++++ yarn.lock | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/vant-cli/src/compiler/compile-site.ts b/packages/vant-cli/src/compiler/compile-site.ts index ca11f8044..ebc7b8598 100644 --- a/packages/vant-cli/src/compiler/compile-site.ts +++ b/packages/vant-cli/src/compiler/compile-site.ts @@ -1,3 +1,4 @@ +import chalk from 'chalk'; import { createServer, build } from 'vite'; import { getViteConfigForSiteDev, @@ -40,5 +41,10 @@ export async function compileSite(production = false) { } else { const server = await createServer(getViteConfigForSiteDev()); await server.listen(); + + const { version } = require('vite/package.json'); + const viteInfo = chalk.cyan(`vite v${version}`); + console.log(`\n ${viteInfo}` + chalk.green(` dev server running at:\n`)); + server.printUrls(); } } diff --git a/yarn.lock b/yarn.lock index 72b057a4c..eef7ba557 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7962,9 +7962,9 @@ vite-plugin-md@^0.11.1: markdown-it "^12.2.0" vite@^2.6.5: - version "2.6.5" - resolved "https://registry.npmmirror.com/vite/download/vite-2.6.5.tgz#c4d25972e2f7371e682da86828722ddf5126f3d1" - integrity sha1-xNJZcuL3Nx5oLahoKHIt31Em89E= + version "2.6.7" + resolved "https://registry.npmmirror.com/vite/download/vite-2.6.7.tgz#e15c1d8327950720b5d7c4ec3fb36a5a58ccf7cb" + integrity sha1-4VwdgyeVByC118TsP7NqWljM98s= dependencies: esbuild "^0.13.2" postcss "^8.3.8"