Skip to content

Commit 9b2eef6

Browse files
committed
[gentesthtml] prefer import over module exports
Reasoning is that the module field needs to be compiled first. But the idea is to avoid compilation.
1 parent 32346f9 commit 9b2eef6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/gentesthtml.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const scopes = {}
2424
const extractModMap = (v, k, pkgName, pathPrefix, importMap) => {
2525
if (k[0] !== '.') return
2626
if (typeof v === 'object') {
27-
extractModMap(v.browser || v.module || v.default || v.import, k, pkgName, pathPrefix, importMap)
27+
extractModMap(v.browser || v.import || v.module || v.default, k, pkgName, pathPrefix, importMap)
2828
} else if (v && v[0] === '.') {
2929
importMap[pkgName + k.slice(1)] = pathPrefix + v.slice(1)
3030
}

0 commit comments

Comments
 (0)