Skip to content

Commit

Permalink
build: fix cjs compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jul 17, 2023
1 parent 448d3c9 commit 65d667c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
7 changes: 7 additions & 0 deletions build.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineBuildConfig } from "unbuild";

export default defineBuildConfig({
rollup: {
inlineDependencies: true,
},
});
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs"
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.mjs",
Expand All @@ -31,7 +32,6 @@
"defu": "^6.1.2",
"get-port-please": "^3.0.1",
"http-shutdown": "^1.2.2",
"ip-regex": "^5.0.0",
"jiti": "^1.19.1",
"mlly": "^1.4.0",
"node-forge": "^1.3.1",
Expand All @@ -45,6 +45,7 @@
"changelogen": "^0.5.4",
"eslint": "^8.45.0",
"eslint-config-unjs": "^0.2.1",
"ip-regex": "^5.0.0",
"prettier": "^3.0.0",
"typescript": "^5.1.6",
"unbuild": "^1.2.1",
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 65d667c

Please sign in to comment.