Skip to content

Commit

Permalink
fix: compatibility with vue-tsc 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
so1ve authored Jun 21, 2024
1 parent 0a2a2e0 commit 1ec5c43
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ const _require = createRequire(import.meta.url)
// isomorphic __dirname https://antfu.me/posts/isomorphic-dirname
const _filename = fileURLToPath(import.meta.url)
const _dirname = dirname(_filename)
const proxyApiPath = _require.resolve('vue-tsc/out/index')
let proxyApiPath: string
try {
proxyApiPath = _require.resolve('vue-tsc/out/index')
} catch (e) {
proxyApiPath = _require.resolve('vue-tsc/index')
}

export async function prepareVueTsc() {
// 1. copy typescript to folder
Expand Down

0 comments on commit 1ec5c43

Please sign in to comment.