Skip to content

Conversation

benadamstyles
Copy link

resolves #310
reverts #282

Component / Package Name:

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

I haven't added tests because you don't already have any for previewing (AFAICT) and I can't even begin to think how I would add them from scratch.

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

Description

Externalising react/jsx-runtime makes it impossible to serve the built preview app to any browser. It seems #282 did this to fix the preview dev server, but I don't have any issues running the dev server locally after making my change.

@shellscape
Copy link
Owner

That's going to reintroduce the React 19 issue with the preview server. That was a real problem. The right fix should probably involve determining which context the build is happening in, and removing it logically.

@benadamstyles
Copy link
Author

Are you sure? I ran the preview server locally with React v19.1.0 and it was fine.

@benadamstyles
Copy link
Author

In fact it seems to me like the real issue is the fact that the server depends on the developer's version of React as a peer dependency, instead of having its own version defined in package.json. That would mean you could control exactly what React internals are available.

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.

Built preview app is not deployable
2 participants