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
One reason to do it this way, is like that plugins don't know to worry about path and we don't have to duplicate the logic once per plugin.
Yeah it makes more sense to do that in the compiler ✅ you probably need to traverse the resulting AST from compiler plugins, check for Fable.Import nodes and update their Path if it contains the${outDir} macro
I have a
Code.tsx
file with aComponents.fs
file where I am binding the component for usage in F#:Then in another file from another directory, I am calling the F#
Code
function to use the component. The generated code is:The issue is that
./Code.tsx
is invalid because the caller file is not inside of the same directory asComponents.fs
:The import path should be relative to where the API is defined.
IHMO this should be the default behaviour otherwise, it means that if you need to use a JSX component then you need to re-declare it several times 😅
A workaround, is to create a standard Feliz binding using
Interop.reactApi.createElement
to we can use Fable special macro${outDir}
:It is important to not mark this member as
inline
otherwise it will not work because the call site is not stable.The text was updated successfully, but these errors were encountered: