-
Notifications
You must be signed in to change notification settings - Fork 1k
USWDS - Core: Remove twig-html-loader dependency #6166
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
- Builds html-templates directory appropriately
- Builds component preview HTML on site
- Builds template HTML on site
- No references to the removed dependency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I installed this branch on uswds-site and received a bunch of Error: Cannot find module 'twig' errors when running npm run build.
Removing the --legacy-peer-deps flag from the gulp build.js file does appear to resolve the errors. (For reference, the flag was added in this commit)
- Curious if anyone else encounters these errors on site?
- If yes, is it reasonable to remove that flag in the uswds-site repo to make this work?
|
@amyleadem I didn't notice the error after installing this branch. Looks like it doesn't happen on CI either since the checks passed and the preview built. If you run a clean install before installing this branch, are you still seeing the errors? |
|
@mahoneycm Yep, did a clean install. Did you remove the existing |
|
@amyleadem oh I did not. Removing the directory did cause the build errors you mentioned before. Great catch! Removing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: @mejiaj highlighted that the --legacy-peer-deps flag has been removed as part of the remove-deps-uswds-6082 test branch and this change should be included in the release. Approving this with the note that we should convert this uswds-site change to a PR that gets published with the other release doc updates.
|
I've renamed the site branch [ |
Summary
Removed unused webpack dependency. We're not using the
twig-html-loaderdependency inuswdsoruswds-site. It's been removed to reduce the number of dependencies.Originated in #5832. Thanks again to @aduth for this contribution.
Breaking change
This is not a breaking change.
Related issue
Closes #6082.
Related pull requests
This is an internal change.
Preview link
Preview link →. There shouldn't be any regressions.
Problem statement
We wanted to confirm there were no regressions here or on
uswds-sitebefore removing the dependency. We build twig templates in this repo as part of our CI to ensure there aren't breaking changes to our component previews on site.Solution
This specific dependency isn't needed and removed to have one less to worry about.
Testing and review
npm run build:htmluswds-site; checkout branch remove-deps-uswds-6082npm install && npm startDependency updates
twig-html-loader