Skip to content

Commit b1e5936

Browse files
authored
Fix identifiers not respecting NODE_ENV for SSR builds (#381)
* Fix identfiers not respecting `NODE_ENV` for SSR builds * Share default ident option * Revert "Share default ident option" This reverts commit d5cd4f2. * Increase snapshots threshold
1 parent f9f8ac4 commit b1e5936

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.changeset/rude-fireants-help.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@vanilla-extract/css': patch
3+
---
4+
5+
Fix identfiers not respecting `NODE_ENV` for SSR builds

packages/css/src/adapter.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ export const mockAdapter: Adapter = {
66
onEndFileScope: () => {},
77
registerComposition: () => {},
88
markCompositionUsed: () => {},
9-
getIdentOption: () => 'debug',
9+
getIdentOption: () =>
10+
process.env.NODE_ENV === 'production' ? 'short' : 'debug',
1011
};
1112

1213
const adapterStack: Array<Adapter> = [mockAdapter];

playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const config: PlaywrightTestConfig = {
55
updateSnapshots: 'none',
66
expect: {
77
toMatchSnapshot: {
8-
threshold: 0.1,
8+
threshold: 0.2,
99
},
1010
},
1111

0 commit comments

Comments
 (0)