loader
Variable: loader
constloader:object
Defined in: packages/react-email/src/loader.ts:20
Wrapper around the dynamic import so it can be spied on in tests (ESM named exports cannot be spied on).
Type Declaration
importModule()
importModule(
url):Promise<any>
Import a module
Parameters
url
string
file URL to import
Returns
Promise<any>
the module namespace
importTsx()
importTsx(
url):Promise<any>
Import a TypeScript/JSX module with the optional tsx peer dependency
tsx compiles JSX with the classic runtime unless the module is covered by a tsconfig with "jsx": "react-jsx",
so React is made global, as the react-email scripts do.
Parameters
url
string
file URL to import
Returns
Promise<any>
the module namespace