opal-vite-rails 0.3.12 → 0.3.13

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: 810c47fa4b67b501e83a0be79ea5f983d5955d90e912ecc0f04ac1ed06021775
4
- data.tar.gz: 12fe595103f3c4ddea6ce2e809066792871581301372d8c464a5b1b9afb04595
3
+ metadata.gz: fb4b027bd6a9af93d8ca80700e7fcadb26251b792e3b0df8f43f72492d680717
4
+ data.tar.gz: 509ab21889bf6c849f0775c051ac6ae98474977fd37fb6251a71d47fce2894f4
5
5
  SHA512:
6
- metadata.gz: 11400a07df86c8c2c71242e992706ec3c5f42d0a58db8eea68dd80a50716794861d0c44d014022efb0664dfcecb57b738931a806ab6823ed2093d8c3ed7135b5
7
- data.tar.gz: badf7f8a3bceef8ec071dc08e614536f89b19b7a8909ccea65858b25b1f586cf5d2c77a7345d8b676c17bb66b92805f4bba9543937c60fcb0a25a828d7058af5
6
+ metadata.gz: c598f18eba197fc1cd9c94f6a21c40997cf05dd4626e6f23f29a5de6d28022891784d7a492e668c0f7542d75a0600c19f09999d6eeb5ec2884e40ce70c0c18be
7
+ data.tar.gz: c4eaef2d98bdf29e2c7d09310cac16a72e37c655f1d8e35605e68e190c788710b2975fb709290454a0dce68fade9199cf1ae52350bf8dbb539e4b4dd3dc3f7eb
@@ -33,9 +33,17 @@ module Opal
33
33
  end
34
34
 
35
35
  # Get asset path from Vite manifest
36
+ #
37
+ # NOTE: the manifest lives on the ViteRuby *instance* — `ViteRuby.manifest`
38
+ # is not a class-level delegator (it raises NoMethodError), so we go
39
+ # through `ViteRuby.instance`. Use ViteRuby::Manifest#path_for (public)
40
+ # rather than #lookup: #lookup is *protected* and returns the raw manifest
41
+ # entry Hash ({ "file" => "..." }), so `lookup(name).to_s` would emit the
42
+ # Hash's inspect string instead of a URL. #path_for returns the resolved
43
+ # asset URL string.
36
44
  def opal_asset_path(name)
37
45
  if defined?(ViteRuby)
38
- ViteRuby.manifest.lookup(name).to_s
46
+ ViteRuby.instance.manifest.path_for(name)
39
47
  else
40
48
  # Fallback to standard asset path
41
49
  "/#{Opal::Vite::Rails.config.public_output_path}/#{name}"
@@ -1,7 +1,7 @@
1
1
  module Opal
2
2
  module Vite
3
3
  module Rails
4
- VERSION = "0.3.12"
4
+ VERSION = "0.3.13"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opal-vite-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.12
4
+ version: 0.3.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - stofu1234