diff --git a/config/react-email.php b/config/react-email.php index 848504b..a8cbccf 100644 --- a/config/react-email.php +++ b/config/react-email.php @@ -4,4 +4,6 @@ 'template_directory' => env('REACT_EMAIL_DIRECTORY'), 'node_path' => env('REACT_EMAIL_NODE_PATH'), + + 'tsx_path' => env('REACT_EMAIL_TSX_PATH'), ]; diff --git a/src/Renderer.php b/src/Renderer.php index 621f444..b842d82 100644 --- a/src/Renderer.php +++ b/src/Renderer.php @@ -18,7 +18,7 @@ private function __construct(string $view, array $data = []) { parent::__construct([ $this->resolveNodeExecutable(), - base_path('/node_modules/.bin/tsx'), + base_path(config('react-email.tsx_path') ?? '/node_modules/.bin/tsx'), __DIR__ .'/../render.tsx', config('react-email.template_directory') . $view, json_encode($data)