diff --git a/modules/styling-transform/lib/utils/createStyleObjectNode.ts b/modules/styling-transform/lib/utils/createStyleObjectNode.ts index ac43bf8357..88d7e0c0d7 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(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(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.createPropertyAssignment( ts.factory.createIdentifier('styles'), diff --git a/modules/styling/lib/cs.ts b/modules/styling/lib/cs.ts index f89652e414..154d92226f 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 = false; + let shouldRuntimeMergeStyles = true; // 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