Skip to content

Conversation

@milesj
Copy link
Contributor

@milesj milesj commented Oct 18, 2025

No description provided.

@fuma-nama
Copy link

fuma-nama commented Oct 23, 2025

A bit of followup on your question on X, I guess you've disabled the error logs, there's indeed error messages (probably due to Vite's CJS handling issues).

image

install hast-util-to-jsx-runtime style-to-js and update your Vite config:

import tailwindCss from "@tailwindcss/vite";
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
import react from "@vitejs/plugin-react";
import mdx from "fumadocs-mdx/vite";
import { defineConfig } from "vite";
import tsConfigPaths from "vite-tsconfig-paths";

const fumadocsDeps = ["fumadocs-core", "fumadocs-ui"];

export default defineConfig({
   // ...
  resolve: {
    noExternal: fumadocsDeps,
  },
  optimizeDeps: {
    include: ["style-to-js", "hast-util-to-jsx-runtime"],
    exclude: fumadocsDeps,
  },
});

@milesj
Copy link
Contributor Author

milesj commented Oct 23, 2025

@fuma-nama Do you not see that error in your docs? I haven't done anything custom here, it's all just fuma stuff.

@fuma-nama
Copy link

fuma-nama commented Oct 23, 2025

Not on most Vite frameworks like React Router, the bundling logic of Vite is hard to interpret because without rolldown some packages are not actually bundled on dev server

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants