Skip to content

Conversation

mhenrixon
Copy link
Contributor

@mhenrixon mhenrixon commented Feb 12, 2024

Since import maps JSPM and the javascript ecosystem are a mess in their current state, allow import maps to match the assets served by the gem rather than download them from JSPM.

pin "@turbo-boost/streams", to: "@turbo-boost/streams.js", preload: false
pin "@turbo-boost/commands", to: "@turbo-boost/commands.js", preload: false
pin "@turbo-boost/elements", to: "@turbo-boost/elements.js", preload: false
pin "alpinejs", preload: false # @3.13.5
pin "@alpinejs/morph", to: "@alpinejs--morph.js", preload: false # @3.13.5

That fixes that problem; I'm happy with this solution for now; seems fair since JSPM never updates. Perhaps we can update the documentation for importmaps to the following:

  1. fix(js): allow pinning importmaps with gem turbo_boost-streams#51
  2. fix(js): allow pinning importmaps with gem turbo_boost-commands#122
  3. fix(js): allow pinning importmaps with gem #49

This is verified to be working with:

gem "turbo_boost-streams",  github: "mhenrixon/turbo_boost-streams"
gem "turbo_boost-commands", github: "mhenrixon/turbo_boost-commands"
gem "turbo_boost-elements", github: "mhenrixon/turbo_boost-elements"

Since import maps JSPM and the javascript ecosystem are a mess in their current state, allow import maps to match the assets served by the gem rather than download them from JSPM.
@hopsoft hopsoft merged commit 1dfffc8 into hopsoft:main Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants