From 2d08761598668c0e7066837ccb0be7b4d5637701 Mon Sep 17 00:00:00 2001 From: Remus Mate Date: Thu, 6 Oct 2022 14:22:28 +1100 Subject: [PATCH 1/2] Use async Babel transform in `integration/transform.ts` (#869) --- .changeset/lovely-lies-hide.md | 5 +++++ packages/integration/src/transform.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/lovely-lies-hide.md diff --git a/.changeset/lovely-lies-hide.md b/.changeset/lovely-lies-hide.md new file mode 100644 index 000000000..2bcb428a0 --- /dev/null +++ b/.changeset/lovely-lies-hide.md @@ -0,0 +1,5 @@ +--- +'@vanilla-extract/integration': patch +--- + +Use correct async Babel transform method in integration transform diff --git a/packages/integration/src/transform.ts b/packages/integration/src/transform.ts index ac5fa2280..88fe1e814 100644 --- a/packages/integration/src/transform.ts +++ b/packages/integration/src/transform.ts @@ -55,7 +55,7 @@ export const transform = async ({ let code = source; if (identOption === 'debug') { - const result = await babel.transform(source, { + const result = await babel.transformAsync(source, { filename: filePath, cwd: rootPath, plugins: [vanillaBabelPlugin, typescriptSyntax], From 31c5ff58d6985f996feddb6491f6ce8a949b8140 Mon Sep 17 00:00:00 2001 From: RD <84049860+reiss-d@users.noreply.github.com> Date: Thu, 13 Oct 2022 22:21:58 +0100 Subject: [PATCH 2/2] Fix normalizeResponsiveValue example in sprinkles docs (#879) --- site/docs/packages/sprinkles.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/site/docs/packages/sprinkles.md b/site/docs/packages/sprinkles.md index 6a7a8685f..b28891293 100644 --- a/site/docs/packages/sprinkles.md +++ b/site/docs/packages/sprinkles.md @@ -643,7 +643,7 @@ This function should be created and exported from your `sprinkles.css.ts` file u > 💡 You can name the generated function whatever you like, typically based on the name of your conditions. ```ts -// app.ts +// sprinkles.css.ts import { defineProperties, createSprinkles, @@ -671,13 +671,13 @@ normalizeResponsiveValue('block'); // -> { mobile: 'block' } normalizeResponsiveValue(['none', null, 'block']); -// -> { mobile: 'block', desktop: 'block' } +// -> { mobile: 'none', desktop: 'block' } normalizeResponsiveValue({ mobile: 'none', desktop: 'block' }); -// -> { mobile: 'block', desktop: 'block' } +// -> { mobile: 'none', desktop: 'block' } ``` ## ConditionalValue