Skip to content

Interaction does not work in preview #275

Description

@dgrachov

Reproduction steps:

  • Install project
  • Run sourcey dev

Expected behavior:

Preview/dev server to display the documentation exactly how it is going to be presented after being built

Actual behavior:

No interaction works on the website. Scrollspy, search, drop-downs, etc.

Relevant logs

There are no errors in the console, no logs, no failed network requests. Only these warnings in the console:

Failed to resolve dependency: preact, present in client 'optimizeDeps.include'
Failed to resolve dependency: preact/jsx-runtime, present in client 'optimizeDeps.include'
Failed to resolve dependency: preact/jsx-dev-runtime, present in client 'optimizeDeps.include'
Failed to resolve dependency: preact/debug, present in client 'optimizeDeps.include'
Failed to resolve dependency: preact/devtools, present in client 'optimizeDeps.include'

Configurations

package.json:

{
  "name": "api-docs",
  "private": true,
  "type": "module",
  "version": "1.0",
  "packageManager": "pnpm@12.3.4",
  "engines": {
    "node": ">=24"
  },
  "scripts": {
    "preview": "sourcey dev",
    "build": "sourcey build"
  },
  "devDependencies": {
    "sourcey": "^3.6.5"
  }
}

sourcey.config.ts:

import { defineConfig, markdown, openapi } from "sourcey";

export default defineConfig({
  name: "API",
  theme: {
    preset: "default",
  },
  navigation: {
    tabs: [
      {
        tab: "Documentation",
        slug: "",
        source: markdown({
          groups: [
            {
              group: "Getting started",
              pages: ["introduction"],
            },
          ],
        }),
      },
      {
        tab: "API Reference",
        slug: "api",
        source: openapi("../api/openapi.yml"),
      },
    ],
  },
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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