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

Fixes to crwa template for prerender #1819

Merged
merged 2 commits into from
Feb 19, 2021

Conversation

dac09
Copy link
Collaborator

@dac09 dac09 commented Feb 19, 2021

  • Fix entry js, not sure when rootElement went missing!
  • Make index a little more readable, as it confuses people with the export default function

@dac09
Copy link
Collaborator Author

dac09 commented Feb 19, 2021

@peterp we broke something during our review 😅

@github-actions
Copy link

📦 PR Packages

Click to Show Package Download Links

https://rw-pr-redwoodjs-com.s3.amazonaws.com/1819/create-redwood-app-0.25.1-2b5bec0.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1819/redwoodjs-api-0.25.1-2b5bec0.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1819/redwoodjs-api-server-0.25.1-2b5bec0.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1819/redwoodjs-auth-0.25.1-2b5bec0.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1819/redwoodjs-cli-0.25.1-2b5bec0.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1819/redwoodjs-core-0.25.1-2b5bec0.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1819/redwoodjs-dev-server-0.25.1-2b5bec0.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1819/redwoodjs-eslint-config-0.25.1-2b5bec0.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1819/redwoodjs-eslint-plugin-redwood-0.25.1-2b5bec0.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1819/redwoodjs-forms-0.25.1-2b5bec0.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1819/redwoodjs-internal-0.25.1-2b5bec0.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1819/redwoodjs-prerender-0.25.1-2b5bec0.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1819/redwoodjs-router-0.25.1-2b5bec0.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1819/redwoodjs-structure-0.25.1-2b5bec0.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1819/redwoodjs-testing-0.25.1-2b5bec0.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/1819/redwoodjs-web-0.25.1-2b5bec0.tgz

Install this PR by running yarn rw upgrade --pr 1819:0.25.1-2b5bec0

@dac09
Copy link
Collaborator Author

dac09 commented Feb 19, 2021

Merging this peter, to unblock testing. We can discuss when you're back online! :)

@dac09 dac09 changed the title Fixes for prerender Fixes to crwa template for prerender Feb 19, 2021
@dac09 dac09 merged commit 1cf589d into redwoodjs:main Feb 19, 2021
@dac09 dac09 deleted the fix/prererender-templates branch February 19, 2021 10:34
@peterp
Copy link
Contributor

peterp commented Feb 19, 2021

Whoops, I made these changes, do we need rootElement? I can't really understand how these changes break things?

@Tobbe
Copy link
Member

Tobbe commented Feb 19, 2021

@peterp See lines 14 and 16? It's used there

@Tobbe
Copy link
Member

Tobbe commented Feb 19, 2021

(Had this been TS it wouldn't even have compiled, just sayin... 😉)

*/
if (document.getElementById('redwood-app').hasChildNodes()) {
*/
const rootElement = document.getElementById('redwood-app')
Copy link
Contributor

Choose a reason for hiding this comment

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

Yep, I was wondering about that!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for the tip @thedavidprice. They don't call you el David for no reason!

Copy link
Contributor

Choose a reason for hiding this comment

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

lulz

I kinda want that on a hat

@thedavidprice thedavidprice added this to the next release milestone Feb 19, 2021
@dac09
Copy link
Collaborator Author

dac09 commented Feb 19, 2021

(Had this been TS it wouldn't even have compiled, just sayin... 😉)

Could not agree with you more

@peterp
Copy link
Contributor

peterp commented Feb 19, 2021

Gah, I really hate the collapsed code blocks in GitHub's previews.

@Tobbe and @dac09: If you love TypeScript so much why don't you go marry it!

@thedavidprice
Copy link
Contributor

@Tobbe and @dac09: If you love TypeScript so much why don't you go marry it!

Favorite. Comment. Ever.

😆

dac09 added a commit to dac09/redwood that referenced this pull request Feb 22, 2021
…rib-workspaces

* 'main' of github.com:redwoodjs/redwood:
  Lint the create-redwood-app template. (redwoodjs#1822)
  Update typescript lint rule for no-unused-vars (redwoodjs#1808)
  Router: Fix TS types (redwoodjs#1823)
  Generate globals for routes (redwoodjs#1744)
  Ethereum auth update to v0.2.1 (redwoodjs#1807)
  Better messages when no routes marked with prerender (redwoodjs#1821)
  Feature/prerender image support (redwoodjs#1721)
  Fix entry js | Make index a little more readable, as it confuses people (redwoodjs#1819)
  use 'prisma' in place of '@prisma/cli' (redwoodjs#1800)
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.

None yet

4 participants