You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are cases in which we might want runtimeInjection: false (like when developing an SSR app), but we still want to use dev: true to provide dev friendly class names.
On the latest version of @stylexjs/babel-plugin, the code changed from
Before, the plugin used ??, which checked for null and undefined; now, it uses ternaries, which check for falseness. This means it will ignore an explicit runtimeInjection: false configuration and fall back to checking for dev.
How to reproduce
Steps to reproduce:
Using the babel-plugin, pass dev: true and runtimeInjection: false.
Runtime will be injected.
Expected behavior
Plugin shouldn't inject the runtime if runtimeInjection is set to false
Environment (include versions). Did this work in previous versions?
0.4.1 version of the babel plugin.
It did work in 0.3.0.
The text was updated successfully, but these errors were encountered:
The problem
There are cases in which we might want
runtimeInjection: false
(like when developing an SSR app), but we still want to usedev: true
to provide dev friendly class names.On the latest version of @stylexjs/babel-plugin, the code changed from
stylex/packages/babel-plugin/src/utils/state-manager.js
Lines 86 to 87 in 4e1be33
to
stylex/packages/babel-plugin/src/utils/state-manager.js
Lines 99 to 106 in a3528b6
Before, the plugin used
??
, which checked for null and undefined; now, it uses ternaries, which check for falseness. This means it will ignore an explicitruntimeInjection: false
configuration and fall back to checking fordev
.How to reproduce
Steps to reproduce:
dev: true
andruntimeInjection: false
.Expected behavior
Plugin shouldn't inject the runtime if
runtimeInjection
is set tofalse
Environment (include versions). Did this work in previous versions?
0.4.1 version of the babel plugin.
It did work in 0.3.0.
The text was updated successfully, but these errors were encountered: