From 13e9e8142a837e23f22fadf06bd01e4584e1e558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E6=A0=91=E4=BA=BA?= Date: Sun, 21 May 2023 14:34:27 +0100 Subject: [PATCH] chore: be flexible about the path to libparakeet sdk --- README.MD | 2 +- vite.config.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.MD b/README.MD index 59a12c7..db09a94 100644 --- a/README.MD +++ b/README.MD @@ -38,7 +38,7 @@ pnpm start /libparakeet-js ``` -若为不同目录,你需要调整 `vite.config.ts` 的 `server.fs.allow` 区段并加入新的路径。 +若为不同目录,你需要调整 `LIB_PARAKEET_JS_DIR` 环境变量到仓库目录,然后再启动 vite 项目。 [libparakeet-js-doc]: https://github.com/parakeet-rs/libparakeet-js/blob/main/README.MD diff --git a/vite.config.ts b/vite.config.ts index 6b24f18..e09bb01 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -33,7 +33,7 @@ export default defineConfig({ 'node_modules', // Allow pnpm to link. - '../libparakeet-js', + process.env.LIB_PARAKEET_JS_DIR || '../libparakeet-js', ], }, },