Skip to content

Commit

Permalink
Comment out execution scope caching (#6092)
Browse files Browse the repository at this point in the history
**Problem:**
The execution scope caching causes issues with CSS and side effecting
imports

**Fix:**
Comment it out until we have a fix

**Manual Tests:**
I hereby swear that:

- [x] I opened a hydrogen project and it loaded
- [x] I could navigate to various routes in Preview mode
  • Loading branch information
Rheeseyb authored and liady committed Dec 13, 2024
1 parent d233303 commit d25f810
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,15 @@ export function createExecutionScope(
editedText: ElementPath | null,
): ExecutionScope {
// Return something from the cache as appropriate.
if (lastSeenProjectContents === projectContents) {
if (filePath in executionScopeCache) {
return executionScopeCache[filePath]
}
} else {
lastSeenProjectContents = projectContents
executionScopeCache = {}
}
// FIXME Uncomment when the caching issue is fixed
// if (lastSeenProjectContents === projectContents) {
// if (filePath in executionScopeCache) {
// return executionScopeCache[filePath]
// }
// } else {
lastSeenProjectContents = projectContents
executionScopeCache = {}
// }

// Build the scope.
const { topLevelElements, imports, jsxFactoryFunction, combinedTopLevelArbitraryBlock } =
Expand Down

0 comments on commit d25f810

Please sign in to comment.