Skip to content

Commit

Permalink
refactor(presets): 纯 esm _dirname
Browse files Browse the repository at this point in the history
  • Loading branch information
markthree committed Dec 1, 2023
1 parent 70b6ab4 commit bb80120
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions presets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@ import Jsx from '@vitejs/plugin-vue-jsx'
import type { ComponentResolver } from 'unplugin-vue-components/types'
import type { Plugin } from 'vite'

export const _dirname =
typeof __dirname !== 'undefined'
? __dirname
: dirname(fileURLToPath(import.meta.url))
export const _dirname = dirname(fileURLToPath(import.meta.url))

export default function () {
const env = useEnv()
Expand Down

0 comments on commit bb80120

Please sign in to comment.