fix ts type error
This commit is contained in:
parent
aa4bcf326d
commit
c8bf0d263c
@ -60,7 +60,13 @@ const config = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
ignorePatterns: ['.eslintrc.js'],
|
ignorePatterns: [
|
||||||
|
'.eslintrc.js',
|
||||||
|
'node_modules/**',
|
||||||
|
'dist/**',
|
||||||
|
'build/**',
|
||||||
|
'main.js',
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = config
|
module.exports = config
|
||||||
|
|||||||
@ -43,6 +43,9 @@ const context = await esbuild.context({
|
|||||||
inject: [path.resolve('import-meta-url-shim.js')],
|
inject: [path.resolve('import-meta-url-shim.js')],
|
||||||
target: 'es2020',
|
target: 'es2020',
|
||||||
logLevel: 'info', // 'debug' for more detailed output
|
logLevel: 'info', // 'debug' for more detailed output
|
||||||
|
logOverride: {
|
||||||
|
'import-is-undefined': 'silent', // 忽略 import-is-undefined 警告
|
||||||
|
},
|
||||||
sourcemap: prod ? false : 'inline',
|
sourcemap: prod ? false : 'inline',
|
||||||
treeShaking: true,
|
treeShaking: true,
|
||||||
outfile: 'main.js',
|
outfile: 'main.js',
|
||||||
|
|||||||
@ -5,7 +5,6 @@
|
|||||||
"minAppVersion": "0.15.0",
|
"minAppVersion": "0.15.0",
|
||||||
"description": "A Cursor-inspired AI assistant for Obsidian that offers smart autocomplete and interactive chat with your selected notes",
|
"description": "A Cursor-inspired AI assistant for Obsidian that offers smart autocomplete and interactive chat with your selected notes",
|
||||||
"author": "Felix.D",
|
"author": "Felix.D",
|
||||||
"authorUrl": "https://github.com/glowingjade",
|
"authorUrl": "https://github.com/infiolab",
|
||||||
"fundingUrl": "https://buymeacoffee.com/glowingjade",
|
"isDesktopOnly": true
|
||||||
"isDesktopOnly": false
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { PGlite } from '@electric-sql/pglite'
|
import { PGlite } from '@electric-sql/pglite'
|
||||||
import { type PGliteWithLive, live } from '@electric-sql/pglite/dist/live'
|
// @ts-ignore
|
||||||
// import { PgliteDatabase, drizzle } from 'drizzle-orm/pglite'
|
import { type PGliteWithLive, live } from '@electric-sql/pglite/live'
|
||||||
import { App, normalizePath } from 'obsidian'
|
import { App, normalizePath } from 'obsidian'
|
||||||
|
|
||||||
import { PGLITE_DB_PATH } from '../constants'
|
import { PGLITE_DB_PATH } from '../constants'
|
||||||
|
|||||||
@ -65,10 +65,10 @@
|
|||||||
/* Module Resolution Paths
|
/* Module Resolution Paths
|
||||||
* Custom path mappings for module resolution
|
* Custom path mappings for module resolution
|
||||||
*/
|
*/
|
||||||
"paths": {
|
// "paths": {
|
||||||
"@codemirror/*": ["node_modules/@codemirror/*"], // Map CodeMirror imports
|
// "@codemirror/*": ["node_modules/@codemirror/*"], // Map CodeMirror imports
|
||||||
"*": ["node_modules/*", "src/types/*"] // Fallback paths for module resolution
|
// "*": ["node_modules/*", "src/types/*"] // Fallback paths for module resolution
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
// Specify which files to include in compilation
|
// Specify which files to include in compilation
|
||||||
"include": ["src/**/*.ts", "src/**/*.tsx", "__mocks__"]
|
"include": ["src/**/*.ts", "src/**/*.tsx", "__mocks__"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user