shellscape / jsx-email

Build emails with a delightful DX
https://jsx.email
MIT License
961 stars 31 forks source link

Dev server fails to start when project `tsconfig.json` has `verbatimModuleSyntax` set to true #31

Closed tom-fletcher closed 11 months ago

tom-fletcher commented 11 months ago

https://stackblitz.com/edit/stackblitz-7k4egl

Expected Behavior

The dev server should start.

Actual Behavior

The dev server does not start, and the browser displays a blank screen. Inspecting the console shows the error:

Uncaught SyntaxError: The requested module '/src/helpers.ts?v=68b8a957' does not provide an export named 'PreviewLanguage' (at code.tsx:4:10)

Additional Information

The issue occurs if the project has a root tsconfig.json file with verbatimModuleSyntax set to true.

To validate this, setting to false allows the dev server to start (but may require browser cache to be cleared first).