Eliminated the moving of typings
MODIFY
packages/kit/.gitignore
packages/kit/.gitignore
/node_modules
/dist
/assets/client.*
-/types
-/client
+/client/**/*.d.ts

ADD
packages/kit/client/tsconfig.json
+{
+ /* Generates the typings for client code */
+ "compilerOptions": {
+ "resolveJsonModule": true,
+ "module": "esnext",
+ "moduleResolution": "node",
+ "target": "ES6",
+ "esModuleInterop": true,
+ "emitDeclarationOnly": true,
+ "declaration": true,
+ "outDir": "."
+ },
+ "include": ["../src/client/**/*", "../src/ambient.d.ts"],
+ "lib": ["ES2020", "dom", "node"]
+}

MODIFY
packages/kit/package.json
packages/kit/package.json
"build": "rollup -c",
"prepare": "npm run build",
"prepublishOnly": "npm run build",
- "prepublish": "tsc && cp -r types/src/client client"
+ "prepublish": "cd client; tsc"
}
}

MODIFY
packages/kit/src/ambient.d.ts
packages/kit/src/ambient.d.ts
@@ -6,5 +6,6 @@ declare module "MANIFEST" {
}
declare module "ROOT" {
- export default any;
+ const root: any;
+ export default root;
}

MODIFY
packages/kit/tsconfig.json
packages/kit/tsconfig.json
"module": "esnext",
"moduleResolution": "node",
"target": "ES6",
- "outDir": "build",
"esModuleInterop": true,
- "emitDeclarationOnly": true,
- "declarationDir": "types",
- "declaration": true
+ "noEmit": true
},
- "include": ["src/**/*", "client"],
+ "include": ["src/**/*"],
"lib": ["ES2020", "dom", "node"]
}

Eliminated the moving of typings