@@ -140,9 +140,9 @@ module.exports = function (babel) {
140140 const partStyle = styleHash [ ROOT_STYLE_PROP_NAME ] ?. partStyle
141141 const inlineStyles = [ ]
142142
143- // Always process if ' observer' import is found in the file
144- // which is needed for styles caching .
145- // Otherwise, if no 'observer' found and no ' styleName' or 'part' found then skip
143+ // Keep old observer-triggered behavior for files that relied on cached
144+ // inline style prop normalization without styleName/part attributes .
145+ // Normal styleName handling does not require observer().
146146 if ( ! ( hasObserver || styleName || partStyle ) ) return
147147
148148 // Check if styleName exists and if it can be processed
@@ -521,7 +521,8 @@ function buildDynamicPart (expr, part) {
521521 }
522522}
523523
524- // if cache is 'teamplay'
524+ // Legacy cache compatibility: observer imports still select the old
525+ // cssxjs/runtime/*-teamplay entrypoints, which now wrap the unified runtime.
525526function checkObserverImport ( $import , state ) {
526527 const observerImports = state . opts . observerImports || DEFAULT_OBSERVER_IMPORTS
527528 const observerName = state . opts . observerName || DEFAULT_OBSERVER_NAME
@@ -587,8 +588,8 @@ function getRuntimePath ($node, state, hasObserver) {
587588 `Invalid cache option value: "${ cache } ". Supported values: ${ OPTIONS_CACHE . join ( ', ' ) } `
588589 )
589590 }
590- // If observer() is used in this file then we force cache to 'teamplay'
591- // TODO: this is a bit of a hack, think of a better way to do this
591+ // Preserve the old import path shape for codebases that still use observer().
592+ // The runtime behind that path no longer imports Teamplay.
592593 if ( ! cache && hasObserver ) cache = 'teamplay'
593594 const reactType = state . opts . reactType
594595 if ( reactType && ! OPTIONS_REACT_TYPES . includes ( reactType ) ) {
0 commit comments