File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -325,9 +325,9 @@ declare module "module" {
325325 }
326326 interface ResolveFnOutput {
327327 /**
328- * A hint to the load hook (it might be ignored)
328+ * A hint to the load hook (it might be ignored); can be an intermediary value.
329329 */
330- format ?: ModuleFormat | null | undefined ;
330+ format ?: string | null | undefined ;
331331 /**
332332 * The import attributes to use when caching the module (optional; if excluded the input will be used)
333333 */
@@ -365,9 +365,9 @@ declare module "module" {
365365 */
366366 conditions : string [ ] ;
367367 /**
368- * The format optionally supplied by the `resolve` hook chain
368+ * The format optionally supplied by the `resolve` hook chain (can be an intermediary value).
369369 */
370- format : ModuleFormat | null | undefined ;
370+ format : string | null | undefined ;
371371 /**
372372 * An object whose key-value pairs represent the assertions for the module to import
373373 */
Original file line number Diff line number Diff line change @@ -191,7 +191,7 @@ Module.Module === Module;
191191 const load : Module . LoadHook = async ( url , context , nextLoad ) => {
192192 const { format } = context ;
193193
194- if ( format ) {
194+ if ( format === 'commonjs' ) { // Needs to match only sometimes
195195 return {
196196 format,
197197 shortCircuit : true ,
You can’t perform that action at this time.
0 commit comments