fix: estabiliza templates de e-mail no CI
- Usa @react-email/components nos templates para evitar módulos ausentes no Bun 1.3.1\n- Ajusta preload do bun test para expor global Element (evita crash do PrismJS)
This commit is contained in:
parent
88a9ef454e
commit
548c2e44d4
5 changed files with 12 additions and 20 deletions
|
|
@ -1,12 +1,5 @@
|
|||
import * as React from "react"
|
||||
import { Body } from "@react-email/body"
|
||||
import { Container } from "@react-email/container"
|
||||
import { Head } from "@react-email/head"
|
||||
import { Html } from "@react-email/html"
|
||||
import { Img } from "@react-email/img"
|
||||
import { Preview } from "@react-email/preview"
|
||||
import { Section } from "@react-email/section"
|
||||
import { Text } from "@react-email/text"
|
||||
import { Body, Container, Head, Html, Img, Preview, Section, Text } from "@react-email/components"
|
||||
|
||||
import { EMAIL_COLORS } from "./tokens"
|
||||
import { getEmailAssetUrl } from "./utils"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import * as React from "react"
|
||||
import { Section } from "@react-email/section"
|
||||
import { Text } from "@react-email/text"
|
||||
import { Section, Text } from "@react-email/components"
|
||||
|
||||
import { EMAIL_COLORS } from "./tokens"
|
||||
import { formatPriority, formatStatus } from "./utils"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
import * as React from "react"
|
||||
import { Button } from "@react-email/button"
|
||||
import { Heading } from "@react-email/heading"
|
||||
import { Hr } from "@react-email/hr"
|
||||
import { Section } from "@react-email/section"
|
||||
import { Text } from "@react-email/text"
|
||||
import { Button, Heading, Hr, Section, Text } from "@react-email/components"
|
||||
|
||||
import { RavenEmailLayout } from "./_components/layout"
|
||||
import { EMAIL_COLORS } from "./_components/tokens"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
import * as React from "react"
|
||||
import { Button } from "@react-email/button"
|
||||
import { Heading } from "@react-email/heading"
|
||||
import { Hr } from "@react-email/hr"
|
||||
import { Section } from "@react-email/section"
|
||||
import { Text } from "@react-email/text"
|
||||
import { Button, Heading, Hr, Section, Text } from "@react-email/components"
|
||||
|
||||
import { RavenEmailLayout } from "./_components/layout"
|
||||
import { EMAIL_COLORS } from "./_components/tokens"
|
||||
|
|
|
|||
|
|
@ -33,6 +33,14 @@ if (typeof window === "undefined" || typeof document === "undefined") {
|
|||
}
|
||||
}
|
||||
|
||||
const globalTarget = globalThis as Record<string, unknown>
|
||||
if (typeof globalTarget.Element === "undefined") {
|
||||
const win = globalTarget.window as undefined | { Element?: unknown }
|
||||
if (win?.Element) {
|
||||
globalTarget.Element = win.Element
|
||||
}
|
||||
}
|
||||
|
||||
const applyFixedDate = () => {
|
||||
if (fixedTimestamp === null) {
|
||||
globalThis.Date = OriginalDate
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue