react-email-rails 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +5 -6
- data/lib/react_email_rails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8f53daab3807503144d3acc647a0d82c164e7c580a01a6c515131eee0f1dbfd9
|
|
4
|
+
data.tar.gz: 4e6529c8d47c16201f929c4c3a4486ec2d8bcf5965ac459b0c99b47bd8d88760
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 395b4fb684b90dc42d154d2a85138ac4aad707e0789f3e5d980a5fd809049643e9255db6bdb6b255650e71288d6c4a8c2d9e81e3b01841e9649991844fe0a2f1
|
|
7
|
+
data.tar.gz: 0360e86df8ed619d6f6ab4294bbbd2c0659bb942d0cb906c68389b17e1541515e1ba1ae5c0f8cb6a8b2ae439d4c87d4d1b649c8e609f8f62893834351c867735
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.2
|
|
4
|
+
|
|
5
|
+
- Support Vite 8 hook filters while keeping production email bundles standalone by default.
|
|
6
|
+
- Keep development email rendering compatible with Vite's module runner.
|
|
7
|
+
|
|
3
8
|
## 0.1.1
|
|
4
9
|
|
|
5
10
|
- Build production React Email bundles from Rails asset tasks with an isolated email-only Vite build.
|
data/README.md
CHANGED
|
@@ -391,10 +391,9 @@ Every render emits an [ActiveSupport::Notifications](https://guides.rubyonrails.
|
|
|
391
391
|
|
|
392
392
|
```ruby
|
|
393
393
|
ActiveSupport::Notifications.subscribe("render.react-email-rails") do |event|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
)
|
|
394
|
+
next if event.payload[:exception]
|
|
395
|
+
|
|
396
|
+
Rails.logger.info("[react-email-rails] Rendered #{event.payload[:component]} (Duration: #{event.duration.round}ms | Size: #{event.payload[:html_bytes]} bytes)")
|
|
398
397
|
end
|
|
399
398
|
```
|
|
400
399
|
|
|
@@ -411,7 +410,7 @@ In development and production, the isolated renderer loads the `reactEmailRails(
|
|
|
411
410
|
| `emails.path` | `"app/javascript/emails"` | Directory containing email components |
|
|
412
411
|
| `emails.extension` | `[".tsx", ".jsx"]` | Component extension, or an array of extensions |
|
|
413
412
|
| `emails.ignore` | `["**/_*", "**/_*/**"]` | Glob patterns ignored under `emails.path` |
|
|
414
|
-
| `standalone` | `true` | Inline
|
|
413
|
+
| `standalone` | `true` | Inline production email bundle dependencies |
|
|
415
414
|
| `vite` | `{}` | Extra email-only Vite config for compilation and resolution |
|
|
416
415
|
|
|
417
416
|
Use a custom directory:
|
|
@@ -458,7 +457,7 @@ These `vite` options are used by `react-email-rails-dev` and `react-email-rails-
|
|
|
458
457
|
|
|
459
458
|
#### Standalone Builds
|
|
460
459
|
|
|
461
|
-
By default the email bundle inlines React, `@react-email/render`, and other Node dependencies. That makes the bundle larger, but it works well for Rails deploys that build assets in one stage and run without `node_modules` in the final runtime image.
|
|
460
|
+
By default the production email bundle inlines React, `@react-email/render`, and other Node dependencies. That makes the bundle larger, but it works well for Rails deploys that build assets in one stage and run without `node_modules` in the final runtime image. Development previews keep dependencies external for Vite's module runner, even when `standalone` is enabled.
|
|
462
461
|
|
|
463
462
|
Set `standalone: false` when your runtime already ships `node_modules` and you prefer a smaller SSR-style bundle:
|
|
464
463
|
|