Closed zakybilfagih closed 6 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
That's actually a nice improvement, since it fixes the mel.raw issue but you will face other issues with styled.tag in native (mel.raw, bindings such as createVariadicElement).
I would propose to add a flag on the ppx (styled-ppx.lib --native) and have a different creation of elements given the flag.
I see.. I guess the first step is to add server-reason-react.browser_ppx
library to styled-ppx.lib
, and set it to add the --js flag when --native flag is not set?
I see.. I guess the first step is to add
server-reason-react.browser_ppx
library tostyled-ppx.lib
, and set it to add the --js flag when --native flag is not set?
aah nvm, this should be handled by the user (?) we just need to emit valid native code right?
Exactly, would be a different code-generation (not very different) but enough to be a separate code-path
I felt the build time is quite slow (tried building e2e/melange/native/ui.re
and it felt considerably slower than the non native variant with styled.{{tag}}
). Can't seem to pin point the slow path.
Is using a lot of ppxlib.metaquot have an impact on build times? It shouldn't affect the build time for the user of the ppx right?
That should have any effect, while building ui (maybe we copy the node_modules by accident?)
That should have any effect, while building ui (maybe we copy the node_modules by accident?)
That doesn't seem to be the case, I tried timing the build command. Just adding the styled.{{tag}} call, cause 2x the build
Maybe the amount of code generated? Can you debug without any prop?
welp, by virtue of having a dozen of arguments (ReactDOM.domProps) will inevitably effect the build time. nothing we can do about it
When trying to use
styled.{{tag}}
on native, got an errorUninterpreted extension 'raw'
This is becauseserver-reason-react.melange_ppx
doesn't recognize theraw
extension