Skip to content

Commit e08d2c1

Browse files
fixed build config, add correct esnext import
1 parent 7ca7cff commit e08d2c1

File tree

3 files changed

+10
-18
lines changed

3 files changed

+10
-18
lines changed

package.json

+3-10
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
11
{
22
"name": "@idapgroup/js-object-utils",
3-
"version": "0.1.8",
3+
"version": "0.2.1",
44
"description": "Javascript functions for transform or mutate object",
55
"main": "build/main/index.js",
6+
"module": "build/module/index.js",
67
"typings": "build/main/index.d.ts",
7-
"exports": {
8-
".": {
9-
"types": "./build/main/index.d.ts",
10-
"es2015": "./build/lib/index.js",
11-
"import": "./build/lib/index.js"
12-
},
13-
"./package.json": "./package.json"
14-
},
158
"repository": {
169
"type": "git",
1710
"url": "https://github.com/idapgroup/js-object-utils.git"
@@ -20,7 +13,7 @@
2013
"scripts": {
2114
"build": "rm -rf build/ && run-p build:*",
2215
"build:main": "tsc -p tsconfig.json",
23-
"build:es-5": "tsc -p tsconfig-es5.json",
16+
"build:module": "tsc -p tsconfig.module.json",
2417
"fix": "run-s fix:*",
2518
"fix:prettier": "prettier \"src/**/*.ts\" --write",
2619
"fix:lint": "eslint src --ext .ts --fix",

tsconfig.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"compilerOptions": {
33
"incremental": true,
4-
"target": "ES2020",
4+
"target": "ES2015",
55
"outDir": "build/main",
66
"rootDir": "src",
7-
"moduleResolution": "Node",
8-
"module": "ES2020",
7+
"moduleResolution": "node",
8+
"module": "CommonJS",
99
"declaration": true,
1010
"inlineSourceMap": true,
1111
"esModuleInterop": true,
@@ -19,7 +19,7 @@
1919
"listEmittedFiles": false ,
2020
"listFiles": false,
2121
"pretty": true,
22-
"lib": ["ES2020", "dom"],
22+
"lib": ["ES2015", "dom"],
2323
"types": [],
2424
"typeRoots": ["node_modules/@types", "src/types"]
2525
},

tsconfig-es5.json renamed to tsconfig.module.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
44
"baseUrl": "./",
5-
"target": "es2015",
6-
"module": "CommonJs",
7-
"moduleResolution": "Node",
5+
"target": "ESNext",
6+
"module": "ESNext",
87
"lib": ["ES2015", "dom"],
9-
"outDir": "./build/lib",
8+
"outDir": "./build/module",
109
}
1110
}

0 commit comments

Comments
 (0)