mirror of
https://github.com/civitai/civitai.git
synced 2026-09-20 22:08:18 +08:00
build: consume form-graph from npm instead of the local link
Swaps the pnpm link: override for the published package (^0.3.0, currently 0.3.1) and removes the two accommodations the link needed: the turbopack.root widening (Turbopack refused files outside the repo) and the tsconfig react/react-dom paths pin (the linked checkout's own @types/react could split the program). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+1
-4
@@ -3,7 +3,6 @@ import { withAxiom } from '@civitai/next-axiom';
|
||||
import bundlAnalyzer from '@next/bundle-analyzer';
|
||||
import CircularDependencyPlugin from 'circular-dependency-plugin';
|
||||
import { createRequire } from 'module';
|
||||
import { fileURLToPath } from 'url';
|
||||
const require = createRequire(import.meta.url);
|
||||
const packageJson = require('./package.json');
|
||||
|
||||
@@ -116,9 +115,7 @@ export default defineNextConfig(
|
||||
// `serverExternalPackages` below, so Turbopack externalizes them and never
|
||||
// emits those warnings — an empty config just acknowledges we're on Turbopack
|
||||
// and silences Next's "webpack config with no turbopack config" build error.
|
||||
// root spans C:work so the pnpm link: to the local form-graph checkout is
|
||||
// inside Turbopack's readable tree (it refuses files outside the root)
|
||||
turbopack: { root: fileURLToPath(new URL('../..', import.meta.url)) },
|
||||
turbopack: {},
|
||||
// Per-branch build dir. Turbopack's dev filesystem cache (~8GB) is invalidated
|
||||
// wholesale by an in-place branch switch, so the dev daemon points each branch at
|
||||
// its own dir and keeps them warm instead of purging. Unset -> stock `.next`.
|
||||
|
||||
+2
-3
@@ -245,7 +245,7 @@
|
||||
"exifreader": "^4.39.0",
|
||||
"fastest-levenshtein": "^1.0.16",
|
||||
"file-saver": "^2.0.5",
|
||||
"form-graph": "^0.2.0",
|
||||
"form-graph": "^0.3.0",
|
||||
"google-auth-library": "^9.15.0",
|
||||
"googleapis": "^144.0.0",
|
||||
"gray-matter": "^4.0.3",
|
||||
@@ -423,8 +423,7 @@
|
||||
"undici@6": "^6.27.0",
|
||||
"tar-fs@2": "^2.1.5",
|
||||
"tar-fs@3": "^3.1.3",
|
||||
"ws@7": "^7.5.11",
|
||||
"form-graph": "link:../../form-graph"
|
||||
"ws@7": "^7.5.11"
|
||||
},
|
||||
"onlyBuiltDependencies": [
|
||||
"@parcel/watcher",
|
||||
|
||||
Generated
+231
-193
File diff suppressed because it is too large
Load Diff
@@ -23,11 +23,6 @@
|
||||
"noUncheckedIndexedAccess": false, // TODO swap to true
|
||||
"paths": {
|
||||
"~/*": ["./src/*"],
|
||||
// form-graph is a pnpm link: — pin react types to the app's copy so the
|
||||
// lib's own node_modules (@types/react 18.3.x) can't split the program.
|
||||
// Remove with the link:/turbopack.root widening before any PR.
|
||||
"react": ["./node_modules/@types/react"],
|
||||
"react-dom": ["./node_modules/@types/react-dom"],
|
||||
"@civitai/db-schema": ["./packages/civitai-db-schema/src/index"],
|
||||
"@civitai/db-schema/*": ["./packages/civitai-db-schema/src/*"],
|
||||
"@civitai/db": ["./packages/civitai-db/src/index"],
|
||||
|
||||
Reference in New Issue
Block a user