rspack_rails 0.10.1 → 0.10.2
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 +5 -0
- data/README.md +2 -0
- data/lib/rspack_rails/installer.rb +2 -2
- data/lib/rspack_rails/layouts.rb +3 -2
- data/lib/rspack_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: fd21aeb3fe8ad80fa42e2bcf1563b2a047d18a3b8239d870c655e0a72ebe2dc7
|
|
4
|
+
data.tar.gz: 47a5e0f7d6dd33cdc102ae13868ec4511d90d4af7cf7e7be85a8f96d2e47a234
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 04754604a520c86fc77442f55443da6ad1a36d6b99b671943e1df252132eb5e87136c0285d9add5ce4bacd3e451fab62024b53d06a3f4f82ec71a85e11c472f5
|
|
7
|
+
data.tar.gz: 951d7a0b553021ede78d5b22afbbef157748cc602cb21739e0df05f69bfa3f9edbedfd3800b19aa22fbcb1575e456519a7fa64e0923af00b07a479054adb5e3e
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.10.2] - 2026-11-13
|
|
4
|
+
|
|
5
|
+
- Fix: `rspack:install` and `rspack:doctor` treated `stylesheet_link_tag :app` inside an ERB comment as a real tag, and the installer rewrote the comment. Only output tags (`<%=` in ERB, `=` in Slim/Haml) count now
|
|
6
|
+
- README links to [rspack_rails-demo](https://github.com/tungnt1203/rspack_rails-demo)
|
|
7
|
+
|
|
3
8
|
## [0.10.1] - 2026-11-13
|
|
4
9
|
|
|
5
10
|
- Fix: after a `rspack build` (which `rspack:build` runs before tests and `assets:precompile`), `rspack serve` reused the build's cached modules, compiled without HMR, so editing a Stimulus controller reloaded the page instead of hot-swapping it. `rspack serve`, development builds and production builds now keep separate persistent caches (`cache.name`)
|
data/README.md
CHANGED
|
@@ -11,6 +11,8 @@ Bundle your Rails app's JavaScript and CSS with [Rspack](https://rspack.rs), the
|
|
|
11
11
|
|
|
12
12
|
rspack_rails follows the `jsbundling-rails` model: Rspack writes bundles to `app/assets/builds`, and Propshaft (or Sprockets) serves and fingerprints them in production.
|
|
13
13
|
|
|
14
|
+
**See it in a real app:** [rspack_rails-demo](https://github.com/tungnt1203/rspack_rails-demo) is a Rails 8 app with Stimulus controllers in TypeScript, Tailwind CSS, code splitting and a second entry point. Its git history has one commit per installer, so you can see exactly what each one changes.
|
|
15
|
+
|
|
14
16
|
**Development**
|
|
15
17
|
- One command setup: `bin/rails rspack:install`, then `bin/dev`
|
|
16
18
|
- HMR for JavaScript, CSS and Stimulus controllers, with an automatic fallback to the asset pipeline when the dev server is not running
|
|
@@ -104,9 +104,9 @@ module RspackRails
|
|
|
104
104
|
say "Replacing `stylesheet_link_tag :app` in #{path}: it would also link rspack's bundles"
|
|
105
105
|
gsub_file path, %r{^[ \t]*<%# Includes all stylesheet files in app/assets/stylesheets %>\n}, ""
|
|
106
106
|
if application_css
|
|
107
|
-
gsub_file path,
|
|
107
|
+
gsub_file path, Layouts::APP_STYLESHEETS, '\1"application"'
|
|
108
108
|
else
|
|
109
|
-
gsub_file path,
|
|
109
|
+
gsub_file path, /#{Layouts::APP_STYLESHEETS.source}.*\n/, ""
|
|
110
110
|
end
|
|
111
111
|
end
|
|
112
112
|
|
data/lib/rspack_rails/layouts.rb
CHANGED
|
@@ -9,8 +9,9 @@ module RspackRails
|
|
|
9
9
|
DIR = "app/views/layouts"
|
|
10
10
|
EXTENSIONS = %w[erb slim haml].freeze
|
|
11
11
|
# Rails 8's default `stylesheet_link_tag :app` links every CSS file under
|
|
12
|
-
# app/assets, rspack's app/assets/builds/*.bundle.css included.
|
|
13
|
-
|
|
12
|
+
# app/assets, rspack's app/assets/builds/*.bundle.css included. Only
|
|
13
|
+
# output tags (`<%=` in ERB, `=` in Slim/Haml) count, not comments.
|
|
14
|
+
APP_STYLESHEETS = /^([ \t]*(?:<%=|=)[ \t]*stylesheet_link_tag[ (]):app\b/
|
|
14
15
|
|
|
15
16
|
module_function
|
|
16
17
|
|
data/lib/rspack_rails/version.rb
CHANGED