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
{{ message }}
Repository navigation
Codemod can mark a bare SVG component clean after its issuer changes to TSRX #2399
With the React-to-Octane codemod, migrate this component with Strong mode and compiler verification enabled. The SVG can contain an ordinary gradient so that it is outside the path-only conversion subset.
Use Rsbuild with @rsbuild/[email protected] and pluginSvgr({ svgrOptions: { exportType: 'default', svgo: false } }). With the plugin's stock issuer rules, a bare import of the same SVG returned a component function from a .tsx issuer and a data:image/svg+xml;base64,… string from a .tsrx issuer.
Actual behavior
The codemod emits Badge.tsrx with "use strong", preserves <Mark /> and the bare import, and reports zero errors. The renderer then receives an asset URL in the component position. The scoped-store migration currently checks the issuer change for components using its adapter. An ordinary component without that hook can encounter the same loader behavior.
Verified with the codemod at aa77e93c2 and Octane 0.16.7. The same reproduction held with and without the optional SVG conversion from #2398.
In a Chromium mount of this fixture, the React original produced one SVG. The compiled Octane output produced zero, and the browser raised InvalidCharacterError when the renderer passed the SVG data URI to document.createElement as a tag.
Expected behavior
Surface an actionable issuer diagnostic or migrate the component through a verified loader and renderer path. Compiling the resulting template alone does not establish that the bundler still supplies a component. Include an ordinary non-store consumer in regression coverage.
Activity