Skip to content
Discussion options

You must be logged in to vote

as you have noticed, the static extractor doesn't traverse files and this is not a feature planned for performance reasons

most of the time, an alternative to the example you quoted could be to use the .raw functions in a file-a.ts export it and import it in a file-b.ts


for variants, however there is currently no recommended way of doing this
I was curious of this use-case so I just tried something and it turns out to be working

please keep in mind it is currently NOT documented and NOT officially supported, it works using private APIs that could change ANYTIME

// utils/variants.ts

const getVariants = () => {
  const spacingTokens = Object.entries({
    red: 'token(colors.red.500)',
    g…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@RubenGlez
Comment options

Answer selected by RubenGlez
Comment options

You must be logged in to vote
1 reply
@RubenGlez
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants