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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 87e5a6099e4591961f8568f277d6470364c52b35ef9a5f859ddba645834d97e9
4
- data.tar.gz: 8130ded931b6caa0d9b0c5a72ce2671891cd6eca53ab7cb29704b7ff65e90891
3
+ metadata.gz: 8f53daab3807503144d3acc647a0d82c164e7c580a01a6c515131eee0f1dbfd9
4
+ data.tar.gz: 4e6529c8d47c16201f929c4c3a4486ec2d8bcf5965ac459b0c99b47bd8d88760
5
5
  SHA512:
6
- metadata.gz: 0654a149d0fc2e8f5bdeafd42e26059ed7b4cf41a223b147a6c45ff42cf5ac8af9d346b13d8a5660682ebf9d7a59b167d3c89e815e2f9cdb719a69b1c2ee9171
7
- data.tar.gz: 37abce1546d5fc5382bcfc9932030433f1e2a6b557fa83f98a4cd30ad3f9e465613148866933f4801281f2c1229935cc3e09a57e54900164ab97da7d6510f8e6
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
- Rails.logger.info(
395
- "[react-email-rails] rendered #{event.payload[:component]} " \
396
- "(#{event.payload[:html_bytes]} bytes) in #{event.duration.round(1)}ms"
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 SSR dependencies with `ssr.noExternal: true` |
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
 
@@ -1,3 +1,3 @@
1
1
  module ReactEmailRails
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: react-email-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Supertape