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

Migrate the React Next example into to the playground Vite environment #818

Closed
doodlewind opened this issue Jan 23, 2023 · 7 comments
Closed
Assignees
Labels
good first issue Good for newcomers mod:infra Environment related issues and discussions

Comments

@doodlewind
Copy link
Member

We have a React hook binding with Next.js example at packages/react/examples/next. However since #815, this kind of example can be built using the default Vite playground. Also:

  • The Next example is not associated with the root level pnpm monorepo, so it has to be installed manually.
  • The Next example doesn't follow some naming conventions (.e.g., kebab-case.ts).

So it will be good to migrate this example to playground/examples/react, this can also remove the blocksuite-react integration in Vercel.

/cc @himself65

@doodlewind doodlewind added good first issue Good for newcomers help wanted mod:infra Environment related issues and discussions labels Jan 23, 2023
@himself65 himself65 self-assigned this Jan 23, 2023
@himself65
Copy link
Contributor

if we use vite to build react. There will have no SSR

@himself65
Copy link
Contributor

@doodlewind
Copy link
Member Author

IMO for the @blocksuite/react example itself, enabling SSR is just something nice-to-have. But for AFFiNE, SSR may make more sense. It would be just fine to keep simplest Vite config to migrate the React example in.

@himself65
Copy link
Contributor

Building the next project for each PR is necessary. In case of people import some side effect code in SSR mode. We could remove it from vercel build it at least need a build test

@doodlewind
Copy link
Member Author

Building the next project for each PR is necessary. In case of people import some side effect code in SSR mode. We could remove it from vercel build it at least need a build test

This makes sense, so how about having an integration package that depends on the Next environment standalone? We can have the current Next example maintained in this package, so that our root level pnpm could initialize it together. For future toolchain integration, we can also make it happen here.

In this case, we can just keep the Vercel integration, and adding the build test of this integration package should be trivial.

@himself65
Copy link
Contributor

discussion #844

@doodlewind
Copy link
Member Author

Closing in favor of #838

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers mod:infra Environment related issues and discussions
Projects
None yet
Development

No branches or pull requests

2 participants