mirror of
https://github.com/affaan-m/ECC.git
synced 2026-09-21 00:58:07 +02:00
Root package.json declared no main or exports, so OpenCode npm plugin resolution (import.meta.resolve) failed and the plugin was silently skipped (#3127). The .opencode TypeScript sources imported siblings with .js specifiers that only exist after compilation, so the home install, which loads the .ts files in place, crashed the tool registry with ERR_MODULE_NOT_FOUND (#3112). Declare main/types/exports on the root package pointing at the compiled plugin entry, switch the sources to .ts specifiers, and enable allowImportingTsExtensions with rewriteRelativeImportExtensions so the emitted dist keeps working .js specifiers. Add smoke tests that build the package, resolve and import the entry by name from a temp install, and verify every in-place relative import resolves. Fixes #3127 Fixes #3112
32 lines
678 B
JSON
32 lines
678 B
JSON
{
|
|
"compilerOptions": {
|
|
"target": "ES2022",
|
|
"module": "NodeNext",
|
|
"moduleResolution": "NodeNext",
|
|
"lib": ["ES2022"],
|
|
"outDir": "./dist",
|
|
"rootDir": ".",
|
|
"strict": true,
|
|
"esModuleInterop": true,
|
|
"skipLibCheck": true,
|
|
"forceConsistentCasingInFileNames": true,
|
|
"declaration": true,
|
|
"declarationMap": true,
|
|
"sourceMap": true,
|
|
"resolveJsonModule": true,
|
|
"isolatedModules": true,
|
|
"allowImportingTsExtensions": true,
|
|
"rewriteRelativeImportExtensions": true,
|
|
"types": ["node"]
|
|
},
|
|
"include": [
|
|
"plugins/**/*.ts",
|
|
"tools/**/*.ts",
|
|
"index.ts"
|
|
],
|
|
"exclude": [
|
|
"node_modules",
|
|
"dist"
|
|
]
|
|
}
|