File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -112,18 +112,18 @@ async function resolveFromDenoModules(
112112 mainEntry = dotExport ;
113113 } else if ( typeof dotExport === "object" ) {
114114 const conditional = dotExport as Record < string , string > ;
115- mainEntry = conditional . import ?? conditional . module ??
116- conditional . default ?? conditional . require ;
115+ mainEntry = conditional [ " import" ] ?? conditional [ " module" ] ??
116+ conditional [ " default" ] ?? conditional [ " require" ] ;
117117 }
118118 }
119119 }
120120
121121 // 2. Fallback to module/main from raw config content (any loaded file)
122122 if ( mainEntry === undefined ) {
123123 for ( const loadedFile of pkgConfig . _loadedFiles ) {
124- const rawContent = loadedFile . content as Record < string , unknown > ;
125- const moduleField = rawContent . module as string | undefined ;
126- const mainField = rawContent . main as string | undefined ;
124+ const rawContent = loadedFile . content ;
125+ const moduleField = rawContent [ " module" ] as string | undefined ;
126+ const mainField = rawContent [ " main" ] as string | undefined ;
127127 mainEntry = moduleField ?? mainField ;
128128 if ( mainEntry !== undefined ) break ;
129129 }
You can’t perform that action at this time.
0 commit comments