Skip to content

[DRAFT] Fix: one-page ESM loading #1346

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

ryan-roemer
Copy link
Member

  • Fix esm.sh importmap loading by switching to external=

Tasks to still do:

  • Remove TODOs around FitText (we need to publish)
  • Changeset

Copy link

changeset-bot bot commented Mar 3, 2025

⚠️ No Changeset found

Latest commit: 7986539

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Mar 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
spectacle-docs-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 3, 2025 3:13am

@scottrippey
Copy link
Member

Just saw this PR, I should've looked before. But I just fixed this in main. Hopefully my approach was sufficient!

@ryan-roemer
Copy link
Member Author

I just pulled main and I'm getting this error:

_entry.js:1 TypeError: Cannot read properties of null (reading 'useRef')
    at da (_entry.js:1:387)
    at aa (_entry.js:1:387)
    at vf (_entry.js:1:387)
    at jr (_entry.js:1:387)
    at hi (_entry.js:1:387)
    at ua (_entry.js:1:387)

and no loading...

Perhaps we try to catch up this diff to main? We don't need the FitText disable now that that's published...

@scottrippey
Copy link
Member

I was sporadically seeing that error too. But I realized that most sporadic errors weren't failing in CI. So I made sure I was using node@18 and pnpm@7 same as CI and things started working again.

@ryan-roemer
Copy link
Member Author

I am seeing it in the chrome browser with no use of Node at all. I forget all the things I had to fix in this branch, but my guess is that there are probably still more fixes needed. The one page site should always load locally in a browser.

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.

2 participants