Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the cable_server_path configurable #62

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

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.
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
1 participant