diff --git a/packages/schema/build.config.ts b/packages/schema/build.config.ts
index f4f1d79bfb..ae065512f7 100644
--- a/packages/schema/build.config.ts
+++ b/packages/schema/build.config.ts
@@ -20,17 +20,9 @@ export default defineBuildConfig({
     'src/index',
     'src/builder-env',
   ],
-  hooks: {
-    'rollup:options' (ctx, options) {
-      ctx.options.rollup.dts.respectExternal = false
-      const isExternal = options.external! as (id: string, importer?: string, isResolved?: boolean) => boolean
-      options.external = (source, importer, isResolved) => {
-        if (source === 'untyped' || source === 'knitwork') {
-          return false
-        }
-        return isExternal(source, importer, isResolved)
-      }
-    },
+  rollup: {
+    dts: { respectExternal: false },
+    inlineDependencies: ['untyped', 'knitwork'],
   },
   externals: [
     // Type imports