mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-08-28 17:42:50 +09:00
Serve Trix from the action_text-trix gem instead of a vendored copy
The importmap pinned a hand-vendored copy of Trix 2.1.19 (vendor/javascript/trix.esm.min.js) that dependency tooling can't see. The action_text-trix gem already in the bundle ships the same 2.1.19 release as app/assets/javascripts/trix.js and adds it to the asset precompile list, so pin against that instead and drop the vendored blob. Trix updates now arrive through ordinary gem bumps, visible to Dependabot and security advisories. The gem's build is UMD rather than ESM, which makes no difference here: application.js imports "trix" only for its side effect of registering the trix-editor and trix-toolbar custom elements, and the UMD build does that via its globalThis branch. No bindings are imported from the module, and Trix styling remains app-owned in app/assets/stylesheets/actiontext.css.
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@ pin "@hotwired/stimulus-loading", to: "stimulus-loading.js"
|
||||
pin "@hotwired/turbo-rails", to: "turbo.js"
|
||||
pin "@rails/actioncable", to: "actioncable.esm.js"
|
||||
pin "@rails/request.js", to: "@rails--request.js" # @0.0.8
|
||||
pin "trix", to: "trix.esm.min.js" # @2.1.19
|
||||
pin "trix", to: "trix.js"
|
||||
pin "@rails/actiontext", to: "actiontext.js"
|
||||
pin "highlight.js", to: "highlight.js/core.js"
|
||||
|
||||
|
||||
Vendored
-7
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user