@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/index.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 ? path13.join(aliasPath, restPath) : aliasPath;
1192
+ const hasStandardExtension = /\.(tsx|ts|jsx|js|json)$/i.test(resolved);
1193
+ if (hasStandardExtension) {
1194
+ if (fs12.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 resolved;
1214
+ return null;
1208
1215
  }
1209
1216
  }
1210
1217
  }