From 04ecfc20eee81636e2dd04ae1e9349883777481d Mon Sep 17 00:00:00 2001 From: "josh.bagwell" Date: Tue, 10 Sep 2024 15:39:47 -0600 Subject: [PATCH] chore: Updated unique id generation for classnames --- modules/styling-transform/lib/utils/createStyleObjectNode.ts | 2 +- modules/styling/lib/cs.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/styling-transform/lib/utils/createStyleObjectNode.ts b/modules/styling-transform/lib/utils/createStyleObjectNode.ts index 88d7e0c0d7..ac43bf8357 100644 --- a/modules/styling-transform/lib/utils/createStyleObjectNode.ts +++ b/modules/styling-transform/lib/utils/createStyleObjectNode.ts @@ -27,7 +27,7 @@ export function createStyleObjectNode(styles: string, name?: string) { [ ts.factory.createPropertyAssignment( ts.factory.createIdentifier('name'), - ts.factory.createStringLiteral(name || generateUniqueId()) // We might be using values that are resolved at runtime, but should still be static. We're only supporting the `cs` function running once per file, so a stable id based on a hash is not necessary + ts.factory.createStringLiteral(generateUniqueId()) // We might be using values that are resolved at runtime, but should still be static. We're only supporting the `cs` function running once per file, so a stable id based on a hash is not necessary ), ts.factory.createPropertyAssignment( ts.factory.createIdentifier('styles'), diff --git a/modules/styling/lib/cs.ts b/modules/styling/lib/cs.ts index 154d92226f..f89652e414 100644 --- a/modules/styling/lib/cs.ts +++ b/modules/styling/lib/cs.ts @@ -745,7 +745,7 @@ export function handleCsProp< // In order to allow everyone to use createStyles and createStencil without worrying about style merge issues, we're going // to enable compat mode all the time. We'll look into possible out-of-order execution issues in the future and plan to re-enable // full static mode (for better performance) once we know why this is happening and have a proper workaround. - let shouldRuntimeMergeStyles = true; + let shouldRuntimeMergeStyles = false; // The order is intentional. The `className` should go first, then the `cs` prop. If we don't do // runtime merging, this order doesn't actually matter because the browser doesn't care the order