Skip to content

Commit fc4f746

Browse files
committed
build: copy over package.json to dist
1 parent 57da6c3 commit fc4f746

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"types": "./dist/index.d.ts"
2020
}
2121
},
22-
"files": ["dist", "README.md", "LICENSE", "package.json"],
2322
"author": "Daniel Schmidt",
2423
"sideEffects": false,
2524
"repository": {
@@ -57,6 +56,7 @@
5756
"build": "run-s build:*",
5857
"build:bundle": "microbundle --name ReactIntersectionObserver --jsx React.createElement -f cjs,umd,es,modern --no-compress",
5958
"build:utils": "tsc -p tsconfig.test.json",
59+
"build:copy": "node scripts/build-copy.js",
6060
"postbuild": "size-limit",
6161
"dev": "yarn run storybook",
6262
"lint": "eslint . --ext js,ts,tsx",
@@ -78,7 +78,12 @@
7878
"plugins": [
7979
"@semantic-release/commit-analyzer",
8080
"@semantic-release/release-notes-generator",
81-
"@semantic-release/npm",
81+
[
82+
"@semantic-release/npm",
83+
{
84+
"pkgRoot": "dist"
85+
}
86+
],
8287
"@semantic-release/github"
8388
]
8489
},

scripts/build-copy.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const fields = [
3636
'exports',
3737
'esmodule',
3838
'exports',
39+
'types',
3940
'typings',
4041
];
4142
fields.forEach((key) => {

0 commit comments

Comments
 (0)