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

Rename references in tests from app/packs to app/javascript #275

Merged
merged 1 commit into from
Apr 4, 2023

Conversation

tomdracz
Copy link
Collaborator

@tomdracz tomdracz commented Apr 3, 2023

Summary

Our default entry paths is app/javascript but tests are still using app/packs in various places. Noticed this causing failures locally when running yarn test

This should unify the handling throughout.

Pull Request checklist

  • Add/update test to cover these changes
  • Update documentation

@tomdracz tomdracz requested review from ahangarha and justin808 April 3, 2023 09:00
@tomdracz
Copy link
Collaborator Author

tomdracz commented Apr 3, 2023

@ahangarha FYI - I think you've tried to do something similar in #274

Copy link
Member

@justin808 justin808 left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -188,7 +188,7 @@ Thus ProvidePlugin manages build-time dependencies to global symbols whereas the

For instance, with [jQuery](https://jquery.com/):
```diff
// app/packs/entrypoints/application.js
// app/javascript/entrypoints/application.js
Copy link
Member

Choose a reason for hiding this comment

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

This makes more sense, however, I've tended to keep the older packs rather than entrypoints term. Both work.

@@ -133,7 +133,7 @@ def preload_pack_asset(name, **options)
# Creates link tags that reference the css chunks from entrypoints when using split chunks API,
# as compiled by webpack per the entries list in package/environments/base.js.
# By default, this list is auto-generated to match everything in
# app/packs/entrypoints/*.js and all the dependent chunks. In production mode, the digested reference is automatically looked up.
# app/javascript/entrypoints/*.js and all the dependent chunks. In production mode, the digested reference is automatically looked up.
Copy link
Member

Choose a reason for hiding this comment

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

Documentation should suggest the key or keys used from the webpacker.yml file that configure this.

@justin808 justin808 merged commit 2841d43 into master Apr 4, 2023
@justin808 justin808 deleted the rename-app-packs-to-app-javascript branch April 4, 2023 08:11
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