bare-module-traverse 2.5.8 → 2.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -897,9 +897,7 @@ function moduleType(url, attributes, info, opts = {}) {
|
|
|
897
897
|
|
|
898
898
|
const match = url.pathname.match(/\.[a-z]+$/)
|
|
899
899
|
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
let [extension] = match
|
|
900
|
+
let extension = match === null ? '.js' : match[0]
|
|
903
901
|
|
|
904
902
|
if (aliases !== null && extension in aliases) extension = aliases[extension]
|
|
905
903
|
|