Skip to content

Conversation

@codergeek121
Copy link
Contributor

This PR adds the option to make the cable_server path /hotwire-spark configurable. This could be used to fix #60. Apps that need to mount on a different path (e.g. because of relative_url_root, could just reconfigure the mount path for them)

It also fixes a circular dependency warning in main, by extracting a config.js file.

* Swap the meta-options and the script tag insertion in the middleware to avoid relying on DOMContentLoaded for setting the configuration values
* Introduce config.js to avoid a circular dependency (fixes a warning in rollup)
This allows users to reconfigure their mount path, e.g. to add a prefix to it. With this config, hotwired#60 could reconfigure the mount path to include the relative_url_root prefix.
Copy link
Member

@jorgemanrubia jorgemanrubia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great one, thanks @codergeek121

@jorgemanrubia jorgemanrubia merged commit 5ac8698 into hotwired:main Jan 25, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Relative url

2 participants