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

feat(endo/init): updated codebase with _document.js. #1

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tgrecojs
Copy link

@tgrecojs tgrecojs commented Mar 6, 2024

@samsiegart I apologize in advance if there are some issues with the format of my code. I was mainly focused on getting the _document.js file together and being able to provide you with some additional input.

* Information on using next.js' beforeInteractive strategy [nextjs.org/docs: no beforeInteractive outside docoument](https://nextjs.org/docs/messages/no-before-interactive-script-outside-document)

* tsconfig.json - resolved typescript compilation error for non-relative paths [Resolving TypeScript Errors in Next.js](https://peterkellner.net/2023/09/15/Resolving-TypeScript-Errors-in-Nextjs/)
@tgrecojs
Copy link
Author

tgrecojs commented Mar 7, 2024

I'm not completely over the hill yet but I think there is some solid progress made. For one, i'm almost certain that the approach that needs to be taken is to use beforeInteractive with _document.js. This change makes use of this approach, and everything seems to render properly. There is only one issue - @endo/init doesn't seem to be doing anything?

Below is a screen grab of the application booting up. You can see that @endo/init is the first script loaded out of the bunch, which is the expected behavior of beforeInteractive. But it doesn't seem to actually be calling lockdown.

endo-init-nextjs.mp4

Here is the URL for this deployment - https://create-cosmos-app-three.vercel.app/.

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.

1 participant