shellscape / jsx-email

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

feat(cli): use alias for preview, support host flag, mute false positive warnings #37

Closed shellscape closed 10 months ago

shellscape commented 11 months ago

Component / Package Name:

This PR contains:

Are tests included?

Breaking Changes?

If yes, please include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.

List any relevant issue numbers:

Description

This PR makes a few changes:

  1. Ditches using symlinks for the Preview templates and shifts to using resolve.alias https://vitejs.dev/config/shared-options.html#resolve-alias. This also resolves the issue when the preview was started in the same directory as node_modules that contains the CLI
  2. Cleans up the email template for the create command
  3. Mutes the false-positive sourcemap warnings when starting the preview
shellscape commented 11 months ago

@lordelogos I'm going to publish a test version of these changes before we merge it. Lots of updates, finally figured out how to leverage Vite's dynamic imports correctly. The preview should be much faster to load and display.