Skip to content

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

Open
@codepunkt

Description

@codepunkt

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions