@lolyjs/core 0.4.0-alpha.1 → 0.4.0-alpha.2
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/dist/cli.cjs +8 -1
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +8 -1
- package/dist/cli.mjs.map +1 -1
- package/dist/index.cjs +8 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +8 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -1189,6 +1189,13 @@ function resolveImportPath(importPath, fromFile, projectRoot) {
|
|
|
1189
1189
|
if (matches) {
|
|
1190
1190
|
const restPath = importPath.startsWith(checkWithSlash) ? importPath.slice(checkWithSlash.length) : "";
|
|
1191
1191
|
const resolved = restPath ? path12.join(aliasPath, restPath) : aliasPath;
|
|
1192
|
+
const hasStandardExtension = /\.(tsx|ts|jsx|js|json)$/i.test(resolved);
|
|
1193
|
+
if (hasStandardExtension) {
|
|
1194
|
+
if (fs11.existsSync(resolved)) {
|
|
1195
|
+
return resolved;
|
|
1196
|
+
}
|
|
1197
|
+
return null;
|
|
1198
|
+
}
|
|
1192
1199
|
const extensions = [".tsx", ".ts", ".jsx", ".js", ".json"];
|
|
1193
1200
|
for (const ext of extensions) {
|
|
1194
1201
|
const withExt = resolved + ext;
|
|
@@ -1204,7 +1211,7 @@ function resolveImportPath(importPath, fromFile, projectRoot) {
|
|
|
1204
1211
|
}
|
|
1205
1212
|
}
|
|
1206
1213
|
}
|
|
1207
|
-
return
|
|
1214
|
+
return null;
|
|
1208
1215
|
}
|
|
1209
1216
|
}
|
|
1210
1217
|
}
|