You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The glob functionality (#2508) correctly finds the require and transforms it into:
// require("./base_structures/**/*") in node_modules/redback/lib/Redback.jsvarglobRequire_base_structures;varinit_=__esm({'require("./base_structures/**/*") in node_modules/redback/lib/Redback.js'(){globRequire_base_structures=__glob({"./base_structures/Bitfield.js": ()=>require_Bitfield(),"./base_structures/Hash.js": ()=>require_Hash(),"./base_structures/List.js": ()=>require_List(),"./base_structures/Set.js": ()=>require_Set2(),"./base_structures/SortedSet.js": ()=>require_SortedSet()});}});
However, this fails with this error due to the missing file extension:
throw new Error("Module not found in bundle: " + path2);
^
Error: Module not found in bundle: ./base_structures/Hash
Can globRequire be adjusted to support the common file extensions that require supports?
If the exact filename is not found, then Node.js will attempt to load the required filename with the added extensions: .js, .json, and finally .node. ref: official doc.
The text was updated successfully, but these errors were encountered:
Library redback has imports like this:
The glob functionality (#2508) correctly finds the require and transforms it into:
However, this fails with this error due to the missing file extension:
Can
globRequire
be adjusted to support the common file extensions thatrequire
supports?The text was updated successfully, but these errors were encountered: