Skip to content

Commit

Permalink
build: add types to subpath exports + bump microbundle
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Oct 25, 2024
1 parent a0731f3 commit 34220f9
Show file tree
Hide file tree
Showing 4 changed files with 761 additions and 881 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"eslint-plugin-promise": "4.3.1",
"eslint-plugin-standard": "4.1.0",
"jsdom": "16.7.0",
"microbundle": "0.12.4",
"microbundle": "0.15.1",
"prettier": "2.8.8",
"vitest": "^2.1.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/beasties-webpack-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"documentation": "13.2.5",
"file-loader": "6.2.0",
"html-webpack-plugin": "4.5.2",
"microbundle": "0.12.4",
"microbundle": "0.15.1",
"mini-css-extract-plugin": "0.10.1",
"webpack": "4.47.0"
},
Expand Down
15 changes: 9 additions & 6 deletions packages/beasties/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@
"module": "dist/beasties.mjs",
"source": "src/index.js",
"exports": {
"import": "./dist/beasties.mjs",
"require": "./dist/beasties.js",
"default": "./dist/beasties.mjs"
".": {
"types": "./dist/index.d.ts",
"import": "./dist/beasties.mjs",
"require": "./dist/beasties.js",
"default": "./dist/beasties.mjs"
}
},
"typings": "src/index.d.ts",
"types": "./dist/index.d.ts",
"files": [
"src",
"dist"
Expand Down Expand Up @@ -41,7 +44,7 @@
"directory": "packages/beasties"
},
"scripts": {
"build": "microbundle --target node --no-sourcemap -f cjs,esm",
"build": "microbundle --target node --no-sourcemap -f cjs,esm && cp src/index.d.ts dist/index.d.ts",
"docs": "documentation readme -q --no-markdown-toc -a public -s Usage --sort-order alpha src",
"prepare": "npm run -s build"
},
Expand All @@ -56,6 +59,6 @@
},
"devDependencies": {
"documentation": "13.2.5",
"microbundle": "0.12.4"
"microbundle": "0.15.1"
}
}
Loading

0 comments on commit 34220f9

Please sign in to comment.