diff --git a/package.json b/package.json index a070f3af..3ef485eb 100644 --- a/package.json +++ b/package.json @@ -21,8 +21,8 @@ "dev": "npm run test:watch", "prebuild": "npm run clean && npm run test", "build": "npm run build:cjs && npm run build:esm", - "build:cjs": "tsc -p tsconfig.build.json --module commonjs --outDir dist/cjs", - "build:esm": "tsc -p tsconfig.build.json --module esNext --outDir dist/esm", + "build:cjs": "tsc -p tsconfig.build.json --module commonjs --outDir dist/cjs --target es5", + "build:esm": "tsc -p tsconfig.build.json --module esNext --outDir dist/esm --target es6", "postbuild": "npm run copy:hooks && npm run update:readme", "pretest": "npm run lint && npm run types-check", "test": "jest", diff --git a/tsconfig.build.json b/tsconfig.build.json index e766c400..38020790 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -3,7 +3,6 @@ "compilerOptions": { "rootDir": "./src", - "target": "esnext", "moduleResolution": "node", "isolatedModules": true, // Needed for CommonJS modules