-
Notifications
You must be signed in to change notification settings - Fork 682
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
#2407 Add yarn serve #2618
#2407 Add yarn serve #2618
Conversation
|
Performance Test Results The following fails have been reported by WebpageTest. These numbers indicates a possible performance issue with the PR which requires further manual testing to validate. https://pr-2618.pwa-venia.com : LH Performance Expected 0.85 Actual 0.33, LH Accessibility Expected 1 Actual 0.97, LH Best Practices Expected 1 Actual 0.93, WPT GZip Expected 100 Actual 26, WPT Cache Expected 90 Actual 39.333333333333 |
@larsroettig Adding If you want it to be available just for that single command, there's a shorter way: NODE_ENV=production yarn stage:venia |
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.
First of all, thank you 🏆 for taking the initiative and making a new Buildpack CLI command. This looks great, and having a default staging script for all PWAs is very important for doing zero-configuration deploys as a Node server.
I have a couple of requested changes, and one general change which is large enough that I'm going to talk about it offline with you, and it can wait until later.
Also: Did you delete packages/pwa-buildpack/lib/WebpackTools/plugins/__tests__/UpwardDevServerPlugin.spec.js
on purpose? We should update the test, not remove it.
packages/pwa-buildpack/lib/WebpackTools/plugins/UpwardDevServerPlugin.js
Outdated
Show resolved
Hide resolved
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.
Everything looks great! I have just one request for a wording change and then i will fully approve.
Update package.json Co-authored-by: James Zetlen <[email protected]> Update packages/pwa-buildpack/lib/Utilities/serve.js Co-authored-by: James Zetlen <[email protected]> Update packages/pwa-buildpack/lib/WebpackTools/plugins/UpwardDevServerPlugin.js Co-authored-by: James Zetlen <[email protected]> Update packages/venia-concept/package.json Co-authored-by: James Zetlen <[email protected]> Update packages/pwa-buildpack/lib/Utilities/serve.js Co-authored-by: James Zetlen <[email protected]>
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.
Code change looks good, but it appears it may have uncovered an existing bug that has broken scaffolding. @zetlen - is this error message accurate, that these upward definition names are illegal? I was trying to avoid doing explicit injection and just loop over the entire veniaSecurityHeaders
collection, but didn't consider -
was an illegal name. I'm relatively certain we merged some PR that started allowing these names for this specific purpose 🤔
edit: This PR definitely has the fix I'm expecting.
@larsroettig @zetlen I've tracked down the problem. Because |
@zetlen any idea how I can fix this bug that scaffolding still works after the merge? |
The Buildpack `createProject` utility was only linking locally to PWA Studio packages that it specifically listed in its package.json. Other packages that were transitive dependencies were not detected and linked. That caused a [regression](#2618 (comment)) in #2618. This PR alters the scaffolding code so it adds explicit dependencies for every local dev-branch package. I also simplified and commented the code as I was auditing it. I also added some unit test coverage so that I could do more robust testing on `createProject`.
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.
Solution for transient deps is working perfectly 👌 thank you @zetlen and @larsroettig for resolving that. Sending to QA.
Description
yarn venia start
NODE_ENV=production yarn venia start
Preconditions
pwa-studio/packages/venia-concept/.env
need to exitsyarn build
need to be executedRelated Issue
Closes #2407
Acceptance
Verification Stakeholders
Specification
Verification Steps
1.1. Forgetting run build should throw an error
Screenshots / Screen Captures (if appropriate)
Checklist