The useImageDrop hook's handleDrop was uploading files and inserting image blocks, but BlockNote already has a native dropFile ProseMirror plugin that does the same via editor.uploadFile — causing duplicate uploads and image block insertions on every drop. Fix: handleDrop now only resets the visual overlay state. BlockNote's native handler handles the actual upload (which calls uploadImageFile) and block insertion with proper drop-position support. Also fix build: exclude test files from tsconfig.app.json (test files use vi.Mock types from vitest, not available in the app build config). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
34 lines
896 B
JSON
34 lines
896 B
JSON
{
|
|
"compilerOptions": {
|
|
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
"target": "ES2022",
|
|
"useDefineForClassFields": true,
|
|
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
"module": "ESNext",
|
|
"types": ["vite/client"],
|
|
"skipLibCheck": true,
|
|
"baseUrl": ".",
|
|
"paths": {
|
|
"@/*": ["./src/*"]
|
|
},
|
|
|
|
/* Bundler mode */
|
|
"moduleResolution": "bundler",
|
|
"allowImportingTsExtensions": true,
|
|
"verbatimModuleSyntax": true,
|
|
"moduleDetection": "force",
|
|
"noEmit": true,
|
|
"jsx": "react-jsx",
|
|
|
|
/* Linting */
|
|
"strict": true,
|
|
"noUnusedLocals": true,
|
|
"noUnusedParameters": true,
|
|
"erasableSyntaxOnly": true,
|
|
"noFallthroughCasesInSwitch": true,
|
|
"noUncheckedSideEffectImports": true
|
|
},
|
|
"include": ["src"],
|
|
"exclude": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/**/*.spec.ts", "src/**/*.spec.tsx"]
|
|
}
|