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 +4 -4
- data/lib/opal/vite/rails/helper.rb +9 -1
- data/lib/opal/vite/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: fb4b027bd6a9af93d8ca80700e7fcadb26251b792e3b0df8f43f72492d680717
|
|
4
|
+
data.tar.gz: 509ab21889bf6c849f0775c051ac6ae98474977fd37fb6251a71d47fce2894f4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
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}"
|