From 3f58108e504a3480af9dc0b0e2acf8e7885e8c04 Mon Sep 17 00:00:00 2001 From: KazariEX <1364035137@qq.com> Date: Thu, 10 Oct 2024 16:33:05 +0800 Subject: [PATCH] fix(playground): use nuxt alias --- playground/nuxt.config.ts | 5 +++++ playground/tsconfig.json | 7 +------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/playground/nuxt.config.ts b/playground/nuxt.config.ts index 6124830..dc2fa30 100644 --- a/playground/nuxt.config.ts +++ b/playground/nuxt.config.ts @@ -1,3 +1,5 @@ +import { fileURLToPath } from "node:url"; + export default defineNuxtConfig({ app: { head: { @@ -7,6 +9,9 @@ export default defineNuxtConfig({ title: "Plain Shiki" } }, + alias: { + "plain-shiki": fileURLToPath(new URL("../src/index.ts", import.meta.url)) + }, css: [ "~/assets/style.css" ], diff --git a/playground/tsconfig.json b/playground/tsconfig.json index cb22b8d..eb97e3f 100644 --- a/playground/tsconfig.json +++ b/playground/tsconfig.json @@ -1,8 +1,3 @@ { - "extends": "./.nuxt/tsconfig.json", - "compilerOptions": { - "paths": { - "plain-shiki": ["../src"] - } - } + "extends": "./.nuxt/tsconfig.json" } \ No newline at end of file