fix: move wrapper detection to global settings and support cross-module style/recipe wrappers (#9)
Some checks failed
CI / Build (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Lint (push) Has been cancelled

This commit is contained in:
Seongmin Choi 2026-04-30 00:22:26 +09:00 committed by GitHub
parent aec1bf7d5d
commit 787d74ec6b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 486 additions and 10 deletions

View file

@ -122,6 +122,36 @@ run({
}],
});
`,
},
// Imported local recipe wrapper with global settings recipe
{
code: `
import { componentRecipe } from './component-recipe.css.js';
const myRecipe = componentRecipe({
base: {
display: 'flex',
alignItems: 'center'
}
});
`,
settings: {
'vanilla-extract': {
recipe: ['componentRecipe'],
},
},
errors: [{ messageId: 'alphabeticalOrder' }],
output: `
import { componentRecipe } from './component-recipe.css.js';
const myRecipe = componentRecipe({
base: {
alignItems: 'center',
display: 'flex'
}
});
`,
},
],
});
});