Add config to specify plugin-transform-react-jsx throwIfNamespace#102
Add config to specify plugin-transform-react-jsx throwIfNamespace#102garthdw wants to merge 1 commit intopreactjs:mainfrom
throwIfNamespace#102Conversation
|
Couldn't you simply specify your own copy of the |
|
@rschristian due to the order of the spreads here: https://github.com/preactjs/preset-vite/blob/main/src/index.ts#L193-L202, it causes warnings about duplicate plugins. Also, we'd be relying on the users to also care about stuff like |
|
In that case, perhaps we can detect if the user-provided plugins contains the jsx transform, and if so, replace the plugin config completely (rather than spread into it)? Another config option is worst-case scenario, and doesn't seem fitting for a niche Babel option.
Their config, their choice whether to care or not. |
It appears that specifying
throwIfNamespacein a.babelrcfile no longer causes it to apply to the@babel/plugin-transform-react-jsxor@babel/plugin-transform-react-jsx-development. Even if specifyingbabelrc: trueas a config option.This is to allow stuff like
unocssattributify mode which supports attributes likedisabled:bg-greyon elements.Currently the only documented use case is
throwIfNamespace.