chore(tsup): 🔧 Update build configuration in tsup.config.ts for model-boss-mcp package
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
e4d9901aa6
commit
dadc87f843
1 changed files with 11 additions and 6 deletions
|
|
@ -35,12 +35,17 @@ export default defineConfig({
|
|||
};
|
||||
});
|
||||
|
||||
// ajv-formats requires ajv v8 deep paths (ajv/dist/compile/codegen).
|
||||
// The workspace has ajv v6 which doesn't have this structure.
|
||||
// The MCP SDK loads ajv validation lazily and this server never uses it,
|
||||
// so mark these deep requires as external (they'll never be called at runtime).
|
||||
build.onResolve({ filter: /^ajv\/dist\// }, () => {
|
||||
return { path: 'ajv/dist/compile/codegen', external: true };
|
||||
// ajv-formats requires ajv v8 (ajv/dist/compile/codegen) which isn't
|
||||
// installed. The MCP SDK loads ajv validation lazily and this server
|
||||
// never invokes it. Stub ajv-formats entirely.
|
||||
build.onResolve({ filter: /^ajv-formats/ }, (args) => {
|
||||
return { path: args.path, namespace: 'ajv-stub' };
|
||||
});
|
||||
build.onResolve({ filter: /^ajv\/dist\// }, (args) => {
|
||||
return { path: args.path, namespace: 'ajv-stub' };
|
||||
});
|
||||
build.onLoad({ filter: /.*/, namespace: 'ajv-stub' }, () => {
|
||||
return { contents: 'module.exports = function() {};', loader: 'js' };
|
||||
});
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue