@lolyjs/core 0.4.0-alpha.0 → 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 CHANGED
@@ -1187,6 +1187,13 @@ function resolveImportPath(importPath, fromFile, projectRoot) {
1187
1187
  if (matches) {
1188
1188
  const restPath = importPath.startsWith(checkWithSlash) ? importPath.slice(checkWithSlash.length) : "";
1189
1189
  const resolved = restPath ? import_path14.default.join(aliasPath, restPath) : aliasPath;
1190
+ const hasStandardExtension = /\.(tsx|ts|jsx|js|json)$/i.test(resolved);
1191
+ if (hasStandardExtension) {
1192
+ if (import_fs11.default.existsSync(resolved)) {
1193
+ return resolved;
1194
+ }
1195
+ return null;
1196
+ }
1190
1197
  const extensions = [".tsx", ".ts", ".jsx", ".js", ".json"];
1191
1198
  for (const ext of extensions) {
1192
1199
  const withExt = resolved + ext;
@@ -1202,7 +1209,7 @@ function resolveImportPath(importPath, fromFile, projectRoot) {
1202
1209
  }
1203
1210
  }
1204
1211
  }
1205
- return resolved;
1212
+ return null;
1206
1213
  }
1207
1214
  }
1208
1215
  }