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

Does not inject devtools in prod and starts rendering before devtools are initialized in dev #15

Open
codepunkt opened this issue Jul 1, 2021 · 0 comments

Comments

@codepunkt
Copy link

codepunkt commented Jul 1, 2021

In my work-in-progress static site renderer @wilsonjs, the prefresh part works, but the devtools part doesn't work at all.

My usage of @preact/preset-vite is here:
https://github.com/wilsonjs/wilson/blob/main/packages/wilson/src/node/vite.ts#L34-L36

Steps to reproduce:

  • clone https://github.com/wilsonjs/wilson/
  • run yarn on root dir to install dependencies
  • run yarn wilson:build to locally build the wilson package
  • run yarn docs:start to start the development build of the wilson documentation or run yarn docs:build && yarn docs:serve to serve the production build of the wilson documentation

Production build doesn't have devtools injected, even though devtoolsInProd is set to true.
Development build seems to have them injected (sometimes they only appear after clientside navigation), but the rendering is started before devtools initialization (at least that's what the preact devtools panel in chrome devtool says).

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

No branches or pull requests

1 participant