- src/lib/types.ts: message contract (both ANALYZE_TEXT shapes preserved), config/response types, storage-key constants. - src/lib/messaging.ts: single safeStorageGet/safeStorageSet/safeSendMessage/ isExtensionValid implementation replacing the three divergent copies in Options, Popup, and content. Content script keeps its refresh-toast behavior via an onContextInvalidated callback. - New '@lib' import alias (wxt force-overwrites '~' and '@' to srcDir, so those cannot point at ./src); wired in wxt.config, tsconfig, vitest. - tests/unit/messaging.test.ts: 14 unit tests over the wrappers. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
29 lines
548 B
JSON
29 lines
548 B
JSON
{
|
|
"compilerOptions": {
|
|
"target": "ESNext",
|
|
"module": "ESNext",
|
|
"moduleResolution": "Bundler",
|
|
"lib": ["ESNext", "DOM"],
|
|
"jsx": "react-jsx",
|
|
"strict": true,
|
|
"noEmit": true,
|
|
"skipLibCheck": true,
|
|
"types": ["chrome"],
|
|
"esModuleInterop": true,
|
|
"resolveJsonModule": true,
|
|
"allowImportingTsExtensions": true,
|
|
"paths": {
|
|
"@lib/*": ["./src/lib/*"]
|
|
}
|
|
},
|
|
"include": [
|
|
"entrypoints/**/*",
|
|
"src/**/*",
|
|
".wxt/types/**/*"
|
|
],
|
|
"exclude": [
|
|
"node_modules",
|
|
".output"
|
|
]
|
|
}
|