Skip to content

Commit

Permalink
fix: pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
hal-wang committed Apr 3, 2024
1 parent 4122d09 commit 3e03d14
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import path from "path";
import { createRequire } from "module";

const pkg = readPackage();
if (pkg.type === "module") {
if (pkg?.type === "module") {
await import("../dist-mjs/main.mjs");
} else {
createRequire(import.meta.url)("../dist-cjs/main.cjs");
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@halsp/cli",
"version": "0.5.7",
"version": "0.5.8",
"description": "Halsp 的命令行脚手架工具",
"engines": {
"node": ">=16"
Expand Down Expand Up @@ -117,6 +117,7 @@
"/dist-mjs/**/*",
"/scaffold/**/*",
"/scaffold/.gitignore",
"/scripts/**/*",
"/src/**/*",
".eslintignore",
".eslintrc.js",
Expand Down

0 comments on commit 3e03d14

Please sign in to comment.