Skip to content

Commit 66f7674

Browse files
authored
Allow developer to specify a path for typescript executable (#12)
* add config value for typescript executable path * set typescript executable from config value
1 parent bad22df commit 66f7674

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

config/react-email.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@
44
'template_directory' => env('REACT_EMAIL_DIRECTORY'),
55

66
'node_path' => env('REACT_EMAIL_NODE_PATH'),
7+
8+
'tsx_path' => env('REACT_EMAIL_TSX_PATH'),
79
];

src/Renderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ private function __construct(string $view, array $data = [])
1818
{
1919
parent::__construct([
2020
$this->resolveNodeExecutable(),
21-
base_path('/node_modules/.bin/tsx'),
21+
base_path(config('react-email.tsx_path') ?? '/node_modules/.bin/tsx'),
2222
__DIR__ .'/../render.tsx',
2323
config('react-email.template_directory') . $view,
2424
json_encode($data)

0 commit comments

Comments
 (0)