import { v }
macro
#1113
KubaJastrz
started this conversation in
Ideas
Replies: 1 comment
-
It is possible to make it work without magic when using e.g Rollup as a bundler, but I am not sure if we should introduce two ways for the same thing. In the meantime, as a workaround, you can create a top-level import * as v from 'valibot';
export { v }; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I understand that
import { v } from 'valibot'
can't work because of the tree-shaking, but what if we created a fake named export that would get transformed into proper as a babel/swc macro? Would you be interested in maintaining this at all?I'll try to create a proof-of-concept soon to see if it'd work how I imagine it.
Lingui uses macros a lot so that's where I got the inspiration.
Beta Was this translation helpful? Give feedback.
All reactions