markprompt-js icon indicating copy to clipboard operation
markprompt-js copied to clipboard

Fix server-side rendering

Open michaelfester opened this issue 1 year ago • 0 comments

Describe the bug Currently, @markprompt/web does not build on the server side.

To Reproduce Steps to reproduce the behavior:

  1. Create a swizzled Docusaurus project
  2. Add a top-level import of @markprompt/web in pages/theme/SearchBar/index.tsx
  3. Run npm run build
  4. See Docusaurus server build error, complaining that document does not exist.

Expected behavior Server-side building should not break. We should avoid all references to client-only APIs outside of client-side hooks.

michaelfester avatar Jul 08 '23 18:07 michaelfester