diff --git a/package.json b/package.json index 5a2ada15ee59..cf59a45267ac 100644 --- a/package.json +++ b/package.json @@ -20,9 +20,9 @@ "src", "bin", "vendors", - "types/index.d.ts" + "index.d.ts" ], - "types": "./types/index.d.ts", + "types": "./index.d.ts", "dependencies": { "@angular/compiler": "12.2.16", "@babel/code-frame": "7.16.7", @@ -164,7 +164,7 @@ "fix": "run-s fix:eslint fix:prettier", "fix:eslint": "yarn lint:eslint --fix", "fix:prettier": "yarn lint:prettier --write", - "build": "node ./scripts/build/build.mjs", + "build": "node ./scripts/build/build.mjs && cp ./types/index.d.ts ./dist", "build:website": "node ./scripts/build-website.mjs", "vendors:bundle": "node ./scripts/vendors/bundle-vendors.mjs" }, diff --git a/scripts/build/build.mjs b/scripts/build/build.mjs index d9cb514eef97..5c9943cb7a37 100644 --- a/scripts/build/build.mjs +++ b/scripts/build/build.mjs @@ -141,7 +141,7 @@ async function preparePackage() { prepublishOnly: "node -e \"assert.equal(require('.').version, require('..').version)\"", }; - packageJson.files = ["*.js", "esm/*.mjs"]; + packageJson.files = ["*.js", "esm/*.mjs", "index.d.ts"]; await writeJson(path.join(DIST_DIR, "package.json"), packageJson); for (const file of ["README.md", "LICENSE"]) {