vite_ruby 1.2.18 → 1.2.20

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: 9c040d1223758720987dc50a487c8cb2cbf07dba6b9bfb5a8a56b883931615d8
4
- data.tar.gz: a6d9fcf29261cab2f4411830378e7b9658264450ff45feb736db5858cd8db7be
3
+ metadata.gz: ba6a2c2dfa0c80f225fa9779b50aa3937c7cc12d260399c858e5491c6e9b9b9b
4
+ data.tar.gz: 2db29cb4b421ea2e4b96a936924b70abd071f32a3272a3d524296989fefe2c99
5
5
  SHA512:
6
- metadata.gz: 13b6146ffcea5681a48c377bdabc798016c95ec595448274eb7deb1d64296244969f47c0f8cd4a5da9cde158dfaca746b07e4dee60feb153809b2b420e62fa6a
7
- data.tar.gz: 684bf03f8e55ff25def1f3d051a3e2111644bc1b080a1faa2a2dbc0c85a925a771a2a6979e7068d9b35736fa155703ef0f851cb56e477999897e9bd3fd8c8697
6
+ metadata.gz: bd0b836df9e9890ac7de7e7729b11deebb064331bcc30e2df82568feae4c219aa6195848dde7b535f292300dfd888824eeabcd59f08175e4da7e450ef6776363
7
+ data.tar.gz: 93eb9909a490974e14b375b2375173b669523e674877783019b9c09d62ff31e46f1a55c6c00d2b15eeffdfff88326d5670759a4fbef96c767ed53a50a394384d
data/CHANGELOG.md CHANGED
@@ -1,10 +1,16 @@
1
- ## <small>1.2.18 (2021-07-19)</small>
1
+ ## [1.2.20](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@1.2.18...vite_ruby@1.2.20) (2021-07-30)
2
2
 
3
- * chore: Avoid inline regex in dev server proxy ([77728aa](https://github.com/ElMassimo/vite_ruby/commit/77728aa))
4
- * test: Update after experimental proxy changes ([1d2e3c7](https://github.com/ElMassimo/vite_ruby/commit/1d2e3c7))
5
- * release: vite_ruby@1.2.18-rc1 ([be92933](https://github.com/ElMassimo/vite_ruby/commit/be92933))
6
- * fix: Proxy entrypoint HMR requests only after verifying the file exists (close #102) ([67c22ec](https://github.com/ElMassimo/vite_ruby/commit/67c22ec)), closes [#102](https://github.com/ElMassimo/vite_ruby/issues/102)
7
3
 
4
+ ### Features
5
+
6
+ * use `asset_host` for Vite client if set during development ([89a338c](https://github.com/ElMassimo/vite_ruby/commit/89a338c2f23e6b43af9dadfd937fe29c82a08b10))
7
+ * Watch Windi CSS config file by default if it exists ([842c5eb](https://github.com/ElMassimo/vite_ruby/commit/842c5eb46cd12887f28ed62cb656d81645c7239c))
8
+
9
+
10
+
11
+ ## [1.2.18](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@1.2.17...vite_ruby@1.2.18) (2021-07-19)
12
+
13
+ * fix: Proxy entrypoint HMR requests only after verifying the file exists (close #102) ([67c22ec](https://github.com/ElMassimo/vite_ruby/commit/67c22ec)), closes [#102](https://github.com/ElMassimo/vite_ruby/issues/102)
8
14
 
9
15
 
10
16
  ## [1.2.17](https://github.com/ElMassimo/vite_ruby/compare/vite_ruby@1.2.16...vite_ruby@1.2.17) (2021-07-12)
@@ -102,6 +102,7 @@ private
102
102
  'package.json',
103
103
  'vite.config.ts',
104
104
  'vite.config.js',
105
+ 'windi.config.ts',
105
106
  config.config_path,
106
107
  ].freeze
107
108
  end
@@ -43,7 +43,7 @@ class ViteRuby::Manifest
43
43
 
44
44
  # Public: The path from where the browser can download the Vite HMR client.
45
45
  def vite_client_src
46
- prefix_vite_asset('@vite/client') if dev_server_running?
46
+ prefix_asset_with_host('@vite/client') if dev_server_running?
47
47
  end
48
48
 
49
49
  # Public: The content of the preamble needed by the React Refresh plugin.
@@ -51,7 +51,7 @@ class ViteRuby::Manifest
51
51
  if dev_server_running?
52
52
  <<~REACT_REFRESH
53
53
  <script type="module">
54
- import RefreshRuntime from '#{ prefix_vite_asset('@react-refresh') }'
54
+ import RefreshRuntime from '#{ prefix_asset_with_host('@react-refresh') }'
55
55
  RefreshRuntime.injectIntoGlobalHook(window)
56
56
  window.$RefreshReg$ = () => {}
57
57
  window.$RefreshSig$ = () => (type) => type
@@ -125,6 +125,12 @@ private
125
125
  File.join("/#{ config.public_output_dir }", path)
126
126
  end
127
127
 
128
+ # Internal: Prefixes an asset with the `asset_host` for tags that do not use
129
+ # the framework tag helpers.
130
+ def prefix_asset_with_host(path)
131
+ File.join(config.asset_host || '/', config.public_output_dir, path)
132
+ end
133
+
128
134
  # Internal: Resolves the paths that reference a manifest entry.
129
135
  def resolve_references(manifest)
130
136
  manifest.each_value do |entry|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ViteRuby
4
- VERSION = '1.2.18'
4
+ VERSION = '1.2.20'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vite_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.18
4
+ version: 1.2.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Máximo Mussini
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-19 00:00:00.000000000 Z
11
+ date: 2021-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-cli
@@ -198,8 +198,8 @@ homepage: https://github.com/ElMassimo/vite_ruby
198
198
  licenses:
199
199
  - MIT
200
200
  metadata:
201
- source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_ruby@1.2.18/vite_ruby
202
- changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_ruby@1.2.18/vite_ruby/CHANGELOG.md
201
+ source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_ruby@1.2.20/vite_ruby
202
+ changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_ruby@1.2.20/vite_ruby/CHANGELOG.md
203
203
  post_install_message:
204
204
  rdoc_options: []
205
205
  require_paths: