diff --git a/package.json b/package.json
index 245c23a..f90e5d9 100644
--- a/package.json
+++ b/package.json
@@ -18,7 +18,7 @@
   "types": "./dist/types/index.d.ts",
   "scripts": {
     "dev": "vite",
-    "build": "vite build && tsc --emitDeclarationOnly && mv dist/src dist/types",
+    "build": "vite build && tsc",
     "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
     "release": "node scripts/release.js"
   },
diff --git a/tsconfig.json b/tsconfig.json
index ca9c7c8..c0b4589 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,7 +1,7 @@
 {
   "compilerOptions": {
     "baseUrl": ".",
-    "outDir": "dist",
+    "outDir": "dist/types",
     "declaration": true,
     "sourceMap": false,
     "target": "esnext",
@@ -10,7 +10,8 @@
     "allowJs": false,
     "strict": true,
     "noUnusedLocals": true,
-    "rootDir": ".",
+    "rootDir": "src",
+    "emitDeclarationOnly": true,
     "types": ["vite/client"]
   },
   "include": [