* Expression for the global registry that collects CSS server-side when there * is no DOM (SSR). An SSR host reads it from `globalThis`; it is keyed by the * style/chunk identifier and namespaced by `output.uniqueName`. * @returns {string} runtime expression evaluating to the registry object
()
| 161 | * @returns {string} runtime expression evaluating to the registry object |
| 162 | */ |
| 163 | cssServerStyleRegistry() { |
| 164 | const name = this.outputOptions.uniqueName; |
| 165 | const key = JSON.stringify( |
| 166 | name ? `__webpack_css__${name}` : "__webpack_css__" |
| 167 | ); |
| 168 | return `(${this.assignOr(`globalThis[${key}]`, "{}")})`; |
| 169 | } |
| 170 | |
| 171 | supportsConst() { |
| 172 | return this.outputOptions.environment.const; |