vite_rails 3.0.12 → 3.0.14
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/CHANGELOG.md +19 -0
- data/lib/vite_rails/tag_helpers.rb +9 -2
- data/lib/vite_rails/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 359c2358de873924f146f74686bf52baf0a3f5ca1b50482f65ca12909d0e2adf
|
4
|
+
data.tar.gz: 99043f619d26034d787054fb59e99067aab619fa074b342a608af3ad8899399a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d37257a70e038ec7f3dc69970aca2989ab881f75a35a0bf7ef4a5c3261eeadbfb5097d5101ebdf95d9fa42a6e58983380c466aa02bf02fd8b68ac9533b5bef0f
|
7
|
+
data.tar.gz: c75f1377b5382c6c041211b9ed28ba60d3141b06c08e13aac04e82fb2002bbe9fc349b70545f3cb33400d172cb08ef5859af1dc0ba7ab6bfc7ce095a79bbe94d
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,22 @@
|
|
1
|
+
## [3.0.14](https://github.com/ElMassimo/vite_ruby/compare/vite_rails@3.0.13...vite_rails@3.0.14) (2023-02-08)
|
2
|
+
|
3
|
+
|
4
|
+
### Features
|
5
|
+
|
6
|
+
* allow javascript_include_tag options to vite_client_tag ([#337](https://github.com/ElMassimo/vite_ruby/issues/337)) ([417bcf3](https://github.com/ElMassimo/vite_ruby/commit/417bcf38366dd26901eb87cedd80d01118d7936f))
|
7
|
+
* make vite_client_tag crossorigin: "anonymous" by default ([404a15a](https://github.com/ElMassimo/vite_ruby/commit/404a15a70c9d4fcd774735045c0d58d3e2aa37f2))
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
## [3.0.13](https://github.com/ElMassimo/vite_ruby/compare/vite_rails@3.0.12...vite_rails@3.0.13) (2022-11-13)
|
12
|
+
|
13
|
+
|
14
|
+
### Bug Fixes
|
15
|
+
|
16
|
+
* avoid removing double extension for non-preprocessor assets ([#301](https://github.com/ElMassimo/vite_ruby/issues/301)) ([2024f62](https://github.com/ElMassimo/vite_ruby/commit/2024f62af917cabcb817c32a5fbbe709d477c19f))
|
17
|
+
|
18
|
+
|
19
|
+
|
1
20
|
## [3.0.12](https://github.com/ElMassimo/vite_ruby/compare/vite_rails@3.0.11...vite_rails@3.0.12) (2022-08-12)
|
2
21
|
|
3
22
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
# Public: Allows to render HTML tags for scripts and styles processed by Vite.
|
4
4
|
module ViteRails::TagHelpers
|
5
5
|
# Public: Renders a script tag for vite/client to enable HMR in development.
|
6
|
-
def vite_client_tag
|
6
|
+
def vite_client_tag(crossorigin: 'anonymous', **options)
|
7
7
|
return unless src = vite_manifest.vite_client_src
|
8
8
|
|
9
|
-
javascript_include_tag(src, type: 'module', extname: false)
|
9
|
+
javascript_include_tag(src, type: 'module', extname: false, crossorigin: crossorigin, **options)
|
10
10
|
end
|
11
11
|
|
12
12
|
# Public: Renders a script tag to enable HMR with React Refresh.
|
@@ -42,7 +42,11 @@ module ViteRails::TagHelpers
|
|
42
42
|
entries = vite_manifest.resolve_entries(*names, type: asset_type)
|
43
43
|
tags = javascript_include_tag(*entries.fetch(:scripts), crossorigin: crossorigin, type: type, extname: false, **options)
|
44
44
|
tags << vite_preload_tag(*entries.fetch(:imports), crossorigin: crossorigin, **options) unless skip_preload_tags
|
45
|
+
|
46
|
+
options[:extname] = false if Rails::VERSION::MAJOR >= 7
|
47
|
+
|
45
48
|
tags << stylesheet_link_tag(*entries.fetch(:stylesheets), media: media, **options) unless skip_style_tags
|
49
|
+
|
46
50
|
tags
|
47
51
|
end
|
48
52
|
|
@@ -54,6 +58,9 @@ module ViteRails::TagHelpers
|
|
54
58
|
# Public: Renders a <link> tag for the specified Vite entrypoints.
|
55
59
|
def vite_stylesheet_tag(*names, **options)
|
56
60
|
style_paths = names.map { |name| vite_asset_path(name, type: :stylesheet) }
|
61
|
+
|
62
|
+
options[:extname] = false if Rails::VERSION::MAJOR >= 7
|
63
|
+
|
57
64
|
stylesheet_link_tag(*style_paths, **options)
|
58
65
|
end
|
59
66
|
|
data/lib/vite_rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vite_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Máximo Mussini
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -88,8 +88,8 @@ homepage: https://github.com/ElMassimo/vite_ruby
|
|
88
88
|
licenses:
|
89
89
|
- MIT
|
90
90
|
metadata:
|
91
|
-
source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_rails@3.0.
|
92
|
-
changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_rails@3.0.
|
91
|
+
source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_rails@3.0.14/vite_rails
|
92
|
+
changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_rails@3.0.14/vite_rails/CHANGELOG.md
|
93
93
|
post_install_message:
|
94
94
|
rdoc_options: []
|
95
95
|
require_paths:
|