Fix @pierre/diffs import path
The import was using a non-exported subpath './utils/parsePatchFiles' which caused Vite to fail during development. The parsePatchFiles function is exported from the main '@pierre/diffs' package entry point. Co-authored-by: Julius Marminge <[email protected]>
This commit is contained in:
1 parent
d25090cf6d
commit
53be870ec4
3 files changed
+17
-1
No files matched your search
@@ -2,6 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<script crossorigin="anonymous" src="https://unpkg.com/react-scan/dist/auto.global.js"></script>
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, viewport-fit=cover, interactive-widget=resizes-content"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { parsePatchFiles } from "@pierre/diffs/utils/parsePatchFiles";
|
||||
import { parsePatchFiles } from "@pierre/diffs";
|
||||
import type { FileDiffMetadata } from "@pierre/diffs/types";
|
||||
|
||||
export const DIFF_THEME_NAMES = {
|
||||
|
||||
@@ -17,6 +17,9 @@ import { hasCloudPublicConfig } from "./cloud/publicConfig";
|
||||
import { getRouter } from "./router";
|
||||
import { APP_DISPLAY_NAME } from "./branding";
|
||||
import { syncDocumentWindowControlsOverlayClass } from "./lib/windowControlsOverlay";
|
||||
import { DraftId, useComposerDraftStore } from "./composerDraftStore";
|
||||
import { scopeProjectRef } from "@t3tools/client-runtime";
|
||||
import type { EnvironmentId, ProjectId, ThreadId } from "@t3tools/contracts";
|
||||
|
||||
// Electron loads the app from a file-backed shell, so hash history avoids path resolution issues.
|
||||
const history = isElectron ? createHashHistory() : createBrowserHistory();
|
||||
@@ -33,6 +36,18 @@ const clerkPublishableKey = import.meta.env.VITE_CLERK_PUBLISHABLE_KEY as string
|
||||
|
||||
const app = <RouterProvider router={router} />;
|
||||
|
||||
if (import.meta.env.VITE_REACT_SCAN_DEMO === "1") {
|
||||
const draftId = DraftId.make("react-scan-demo");
|
||||
useComposerDraftStore.getState().setProjectDraftThreadId(
|
||||
scopeProjectRef("react-scan-env" as EnvironmentId, "react-scan-project" as ProjectId),
|
||||
draftId,
|
||||
{
|
||||
threadId: "react-scan-thread" as ThreadId,
|
||||
createdAt: "2026-01-01T00:00:00.000Z",
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
|
||||
<React.StrictMode>
|
||||
{clerkPublishableKey && hasCloudPublicConfig() ? (
|
||||
|
||||
Reference in new issue
Block a user