Skip to content

Commit 772616b

Browse files
committed
fix: require in CJS, close unplugin#483
1 parent 52f120f commit 772616b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export function resolveOptions(options: Options, root: string): ResolvedOptions
7676
return resolved
7777
}
7878

79-
const _require = createRequire(import.meta.url)
79+
const _require = typeof require === 'undefined' ? createRequire(import.meta.url) : require
8080
function getVueVersion() {
8181
try {
8282
const vue = _require('vue')

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy