vite_ruby 1.2.4 → 1.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c6458518b8b17adb635482493bd218588d7c46d6bff8e111b35083e7ef69e6eb
4
- data.tar.gz: b2008263d7d2915f57df9762cd321bab1082172802787d894b6e10f6ae928a42
3
+ metadata.gz: 4cf73b3471127a2ca30bb94a9db5eadde2674289194dbe605ae01c3dc9bee817
4
+ data.tar.gz: 93312a90a04807cb3f683f9435fddd399ffdfeda7dff31b9316c9977fb1b7a22
5
5
  SHA512:
6
- metadata.gz: 0b18bf0c81b828ad4d019761f479b916607a9c69f1979826816a86e84d97b3c9774e1463364256a286e575eff824f98231e09becc0b261e0a177cacca0c557db
7
- data.tar.gz: c4c73277666975746a5054a5758bd93e07a00dfde34e67701342f8ef6abac5cc7b4c64b12ad786d5e5c19bf2a061c9254ae20744faf01a9345a78743e591a0c1
6
+ metadata.gz: 789ff6d9d918b741f1430e802ea7fed4404ae3e216748d26b48f48c6a3d41976197f00a7e2ed3878b88d819fb2b812bef14099f753d884e02c6f0ea8acc5b315
7
+ data.tar.gz: 58044eba7336765db7a63bfa871f0c7ede9b28ef8ebf66708eb9c8c669abb7ca24f9855878af55fe02afd3e5d5126e1f49e5ef7e4feeaf8229984f59445c38d1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## [1.2.5](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@1.2.4...vite_ruby@1.2.5) (2021-04-21)
2
+
3
+
4
+ ### Features
5
+
6
+ * Add helpers to enable HMR when using @vitejs/plugin-react-refresh ([a80f286](https://github.com/ElMassimo/vite_ruby/commit/a80f286d4305bbae29ea7cea42a4329a530f43fa))
7
+
8
+
9
+
1
10
  ## [1.2.4](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@1.2.3...vite_ruby@1.2.4) (2021-04-21)
2
11
 
3
12
 
@@ -46,6 +46,21 @@ class ViteRuby::Manifest
46
46
  prefix_vite_asset('@vite/client') if dev_server_running?
47
47
  end
48
48
 
49
+ # Public: The content of the preamble needed by the React Refresh plugin.
50
+ def react_refresh_preamble
51
+ if dev_server_running?
52
+ <<~REACT_REFRESH
53
+ <script type="module">
54
+ import RefreshRuntime from '#{ prefix_vite_asset('@react-refresh') }'
55
+ RefreshRuntime.injectIntoGlobalHook(window)
56
+ window.$RefreshReg$ = () => {}
57
+ window.$RefreshSig$ = () => (type) => type
58
+ window.__vite_plugin_react_preamble_installed__ = true
59
+ </script>
60
+ REACT_REFRESH
61
+ end
62
+ end
63
+
49
64
  protected
50
65
 
51
66
  # Internal: Strict version of lookup.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ViteRuby
4
- VERSION = '1.2.4'
4
+ VERSION = '1.2.5'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vite_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Máximo Mussini
@@ -237,8 +237,8 @@ homepage: https://github.com/ElMassimo/vite_ruby
237
237
  licenses:
238
238
  - MIT
239
239
  metadata:
240
- source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_ruby@1.2.4/vite_ruby
241
- changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_ruby@1.2.4/vite_ruby/CHANGELOG.md
240
+ source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_ruby@1.2.5/vite_ruby
241
+ changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_ruby@1.2.5/vite_ruby/CHANGELOG.md
242
242
  post_install_message:
243
243
  rdoc_options: []
244
244
  require_paths: