Skip to content

fix(player): add workerd to node exports#1198

Merged
mihar-22 merged 1 commit into
vidstack:mainfrom
pgraug:main
Mar 8, 2024
Merged

fix(player): add workerd to node exports#1198
mihar-22 merged 1 commit into
vidstack:mainfrom
pgraug:main

Conversation

@pgraug

@pgraug pgraug commented Mar 7, 2024

Copy link
Copy Markdown
Contributor

Related:

Similair to #1196 but now it's for Cloudflare Workers/Pages instead of Deno.

Description:

Adds the workerd key to the packages conditional exports, so Cloudflare Workers will use the server bundle.

Before it was using the browser bundle which broke my Nuxt 3 site when server-side rendering the Vidstack player.

I've tried to just 1-to-1 matches the changes made for Bun and Deno yesterday.

Ready?

Yes.

Anything Else?

Cloudflare's docs on the workerd exports key

Review Process:

  • Clone reproduction from Altinget/nuxt-vidstack-reproduction
  • Install packages with npm i
  • Build project and run it locally via Cloudflare's Wrangler CLI with npm run build && npx wrangler pages dev dist/

Before the change it fails like so:
image

After the change it instead starts the server and you can go to http://localhost:8788/other-page and it loads without throwing any errors.

@mihar-22 mihar-22 merged commit dedd706 into vidstack:main Mar 8, 2024
@mihar-22

mihar-22 commented Mar 8, 2024

Copy link
Copy Markdown
Member

Thank you!

@NOBLES5E

Copy link
Copy Markdown

Great to see this gets fixed now. It has been the biggest blocker for us to adopt vidstack. Thanks!

@mihar-22 Any idea when we expect to see the next release? Thanks for developing such a helpful piece of software 👍

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.

3 participants