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

Hide entry.js | Add setup command to restore #1842

Merged
merged 12 commits into from
Feb 24, 2021

Conversation

dac09
Copy link
Collaborator

@dac09 dac09 commented Feb 23, 2021

What?

Hide's entry.js (the mount point of the web side), and houses it internally within @redwoodjs/web

If you're a power user 💪🏽, and want to customise it, simply run yarn rw setup custom-entry and it'll add it back to your project.

Help needed 🚩

  • Suggest a better name for the setup function
  • Is there any code I can add to make it easier for the typescript transition?

Note

⚠ This is a breaking change, whether you're opt-ing in to prerender or not.

@dac09 dac09 changed the title Hide entry.js | Add setup command to restore [Proposal] Hide entry.js | Add setup command to restore Feb 23, 2021
@github-actions
Copy link

github-actions bot commented Feb 23, 2021

📦 PR Packages

Click to Show Package Download Links

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

Install this PR by running yarn rw upgrade --pr 1842:0.25.1-7982ee0

@peterp
Copy link
Contributor

peterp commented Feb 23, 2021

Looking good! 👍

@dac09
Copy link
Collaborator Author

dac09 commented Feb 23, 2021

Thanks for the idea @peterp !

Copy link
Contributor

@peterp peterp left a comment

Choose a reason for hiding this comment

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

A few small things that I noticed 👍

@dac09 dac09 marked this pull request as ready for review February 23, 2021 19:27
@dac09 dac09 changed the title [Proposal] Hide entry.js | Add setup command to restore Hide entry.js | Add setup command to restore Feb 23, 2021
Copy link
Contributor

@peterp peterp left a comment

Choose a reason for hiding this comment

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

This is looking great, approved, pending those docs :)

@thedavidprice
Copy link
Contributor

Taking this for an E2E spin now. Specifically double-checking the template codebase changes (for my sanity).

@thedavidprice
Copy link
Contributor

@dac09 CI lint error. Ignore?

Screen Shot 2021-02-24 at 9 54 51 AM

@dac09
Copy link
Collaborator Author

dac09 commented Feb 24, 2021

@dac09 CI lint error. Ignore?

Yeah must be the new eslint configs that just went in. I'll see if I can selectively ignore these when I update this branch

Copy link
Contributor

@thedavidprice thedavidprice left a comment

Choose a reason for hiding this comment

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

Result of E2E test is a runtime error that's blocking merge:
Screen Shot 2021-02-24 at 11 03 37 AM

Looks like you get a Babel ChooseYourOwnAdventure™

Add @babel/preset-react (https://git.io/JfeDR) to the 'presets' section of your Babel config to enable transformation.

If you want to leave it as-is, add @babel/plugin-syntax-jsx (https://git.io/vb4yA) to the 'plugins' section to enable parsing.

@dac09
Copy link
Collaborator Author

dac09 commented Feb 24, 2021

Can confirm :(. It works ok when building, but not when running yarn rw dev unfortunately, hence the e2e test failing I think. So glad you ran that 👍

@dac09
Copy link
Collaborator Author

dac09 commented Feb 24, 2021

Ok @thedavidprice, e2e tests now pass for me. Sorry about this. Please give it a go on your side!

I'm really sad I couldn't use my elegant template solution for the setup command 😭

dac09 and others added 4 commits February 24, 2021 21:35
… feature/hide-entry-js

* 'feature/hide-entry-js' of github.com:dac09/redwood:
  Docs: Update CONTRIBUTING.md `rwt link` docs (redwoodjs#1852)
  Fixes generating scenarios for relations where the field name is different than the relation name (redwoodjs#1848)
@thedavidprice thedavidprice merged commit 80be24a into redwoodjs:main Feb 24, 2021
@thedavidprice thedavidprice added this to the next release milestone Feb 24, 2021
@dac09 dac09 deleted the feature/hide-entry-js branch February 24, 2021 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:breaking This PR is a breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants