-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(jsx-email,create-jsx-email): deal with node:fs/promise imports in…
… preview (#177)
- Loading branch information
1 parent
052f4d7
commit 7607c08
Showing
9 changed files
with
833 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Note: This tests the fix for https://github.com/shellscape/jsx-email/issues/174 | ||
|
||
import { Html, Tailwind } from 'jsx-email'; | ||
// @ts-ignore | ||
import { definePreset, presetUno } from 'unocss'; | ||
|
||
export const preset = definePreset(() => { | ||
return { | ||
presets: [presetUno()] | ||
}; | ||
}); | ||
|
||
export const TemplateName = 'Issue174'; | ||
|
||
export const Template = () => ( | ||
<Tailwind config={{ presets: [preset] }}> | ||
<Html></Html> | ||
</Tailwind> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
apps/test/tests/.snapshots/smoke.spec.ts-Issue-174-chromium.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<html | ||
lang="en" | ||
dir="ltr" | ||
> | ||
<head> | ||
<style tailwind> | ||
/* layer: preflights */ | ||
</style> | ||
</head> | ||
<body> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,6 +72,7 @@ export const viteConfig = defineConfig({ | |
], | ||
resolve: { | ||
alias: { | ||
'node:fs/promises': 'node-stdlib-browser/mock/empty', | ||
path: 'path-browserify', | ||
postcss: 'https://jspm.dev/[email protected]', | ||
rehype: 'https://jspm.dev/[email protected]', | ||
|
Oops, something went wrong.