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

Fix setting custom preview_paths #658

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tvdeyen
Copy link

@tvdeyen tvdeyen commented Dec 16, 2024

Setting preview_paths to anything else than test/components/previews is broken, because we mutate ActiveSupport::Dependencies.autoload_paths.

From the Rails guides:

Please do not mutate ActiveSupport::Dependencies.autoload_paths;
the public interface to change autoload paths is config.autoload_paths.

Refs: ViewComponent/view_component#365

Setting `preview_paths` to anything else than `test/components/previews`
is broken, because we mutate `ActiveSupport::Dependencies.autoload_paths`.

From the Rails guides:

> Please do not mutate ActiveSupport::Dependencies.autoload_paths;
> the public interface to change autoload paths is config.autoload_paths.

Refs: ViewComponent/view_component#365
Copy link

netlify bot commented Dec 16, 2024

Deploy Preview for lookbook-docs canceled.

Name Link
🔨 Latest commit d260f8a
🔍 Latest deploy log https://app.netlify.com/sites/lookbook-docs/deploys/676041875bc99d0008ad8bb7

@Spone Spone requested a review from allmarkedup December 16, 2024 22:37
@Spone
Copy link
Contributor

Spone commented Dec 16, 2024

Looking good to me. @allmarkedup what do you think?

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