Add example-basepath and example-inside-next#94
Conversation
example-basepath: minimal holocron docs site with base: /docs. Exports dist/rsc for embedding in other frameworks. example-inside-next: Next.js 16 app that mounts the basepath example at /docs via a catch-all route handler. Uses turbopackIgnore/webpackIgnore comments on the dynamic import so bundlers skip the pre-built vite output and Node.js resolves it at runtime. Empty next.config.ts, works with both Turbopack (default in Next 16) and webpack. Session: ses_1f4149c2effeI6lDwAx7Zqp3VI
Picks up the findSourceMapURL production strip fix: the dev-only /__vite_rsc_findSourceMapURL URL is no longer emitted in production SSR/browser builds, removing one of the two bundler-incompatible patterns from the vite build output. Session: ses_1f4149c2effeI6lDwAx7Zqp3VI
Verifies that holocron API routes (chat endpoint) are reachable under the base path prefix and that non-prefixed routes are rejected. Session: ses_1f4149c2effeI6lDwAx7Zqp3VI
Session: ses_1f4149c2effeI6lDwAx7Zqp3VI
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f688835b5d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| export default defineConfig({ | ||
| clearScreen: false, | ||
| plugins: [holocron()], | ||
| plugins: [holocron({ pagesDir: './src' })], |
There was a problem hiding this comment.
Keep the template OpenAPI spec resolvable
The OpenAPI provider resolves tab.openapi via path.resolve(projectRoot, specPath) in vite/src/lib/openapi/provider.ts, not relative to pagesDir. With the template now using pagesDir: './src' and the spec moved to template/src/api.yaml, template/docs.json still references "openapi": "api.yaml", so any newly scaffolded site that keeps the default API Reference tab will fail vite build with [holocron] OpenAPI spec not found: <project>/api.yaml until the user manually changes the config or moves the spec back to the project root.
Useful? React with 👍 / 👎.
# Conflicts: # cli/package.json # example-cloudflare/package.json # example/package.json # integration-tests/package.json # pnpm-lock.yaml # vite/package.json # website/package.json
Takumi WASM code was moved out of the vite plugin into the website og-worker, so the pre-built holocron output no longer contains patterns that break Next.js bundlers. The dynamic import works cleanly with Turbopack without any ignore directives. Also includes next-env.d.ts update from Next.js 16.2.6 dev server. Session: ses_1e9228e58ffetDjZV1BQwIHlJL
example-basepath — minimal holocron docs site with
base: '/docs', exportsdist/rscfor embedding.example-inside-next — Next.js 16 app that mounts holocron at
/docsvia a[[...slug]]catch-all route. UsesturbopackIgnore/webpackIgnorecomments on the dynamic import so the bundler skips the pre-built vite output. Emptynext.config.ts, works with Turbopack (Next 16 default) and webpack.Also updates spiceflow to
1.24.2-rsc.0which strips the dev-onlyfindSourceMapURLfrom production builds, and adds base-path API route integration tests.