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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1e51852e4eb41c7fe39cd5c6d3394796f93c9ac8d8e276fa938468ce171c43f3
4
- data.tar.gz: 186f650fc3bb54bf272f83bc46829c8d57b409136f7754e3727696370d2a6060
3
+ metadata.gz: fd21aeb3fe8ad80fa42e2bcf1563b2a047d18a3b8239d870c655e0a72ebe2dc7
4
+ data.tar.gz: 47a5e0f7d6dd33cdc102ae13868ec4511d90d4af7cf7e7be85a8f96d2e47a234
5
5
  SHA512:
6
- metadata.gz: 376c47e36d835aa9b37642f4c86d857419db635cd4555d7ce3685f99b96b337b735c00794449f605fcc06be85ee3c35ce7bda81a34728c9d5e9e5c9c24217f90
7
- data.tar.gz: 1ac79a9a979f04713f2d967e02f513217fad4a92b172fbee4efc5627339977104856494cf1cacd4eda02f0068cef0bce237a06d13e593c0c3d5346067831b692
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, /(stylesheet_link_tag[ (]):app\b/, '\1"application"'
107
+ gsub_file path, Layouts::APP_STYLESHEETS, '\1"application"'
108
108
  else
109
- gsub_file path, /^[ \t]*(?:<%=|=)[ \t]*stylesheet_link_tag[ (]:app\b.*\n/, ""
109
+ gsub_file path, /#{Layouts::APP_STYLESHEETS.source}.*\n/, ""
110
110
  end
111
111
  end
112
112
 
@@ -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
- APP_STYLESHEETS = /stylesheet_link_tag[ (]:app\b/
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RspackRails
4
- VERSION = "0.10.1"
4
+ VERSION = "0.10.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspack_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - tungnt