@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/index.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_path15.default.join(aliasPath, restPath) : aliasPath;
1190
+ const hasStandardExtension = /\.(tsx|ts|jsx|js|json)$/i.test(resolved);
1191
+ if (hasStandardExtension) {
1192
+ if (import_fs12.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
  }
@@ -22882,7 +22889,7 @@ function bootstrapClient(routes, notFoundRoute, errorRoute = null) {
22882
22889
  initializeRouterData(routerPathname + window.location.search, initialData);
22883
22890
  const routePattern = initialData?.pathname || window.location.pathname;
22884
22891
  const routeDeps = getRouteDependencies(routePattern);
22885
- const hasClientIslands = !!routeDeps && (routeDeps.isPageClientComponent === true || routeDeps.isLayoutClientComponent && routeDeps.isLayoutClientComponent.some((v) => v) || routeDeps.directClientComponents && routeDeps.directClientComponents.length > 0);
22892
+ const hasClientIslands = !!routeDeps && (routeDeps.isPageClientComponent === true || routeDeps.isLayoutClientComponent && routeDeps.isLayoutClientComponent.some((v) => v));
22886
22893
  const initialState = await loadInitialRoute(
22887
22894
  initialUrl,
22888
22895
  initialData,