diff --git a/package.json b/package.json index 25c0487..9327568 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,11 @@ "types": "lib/index.d.ts", "source": "src/index.ts", "umd:main": "umd/bundle.min.js", + "type": "module", + "exports": { + "import": "./lib/index.js", + "require": "./dist/index.js" + }, "scripts": { "build": "npm run build:es6 && npm run build:commonjs && npm run build:umd && npm run build:docs", "build:es6": "rm -rf lib && tsc", @@ -34,7 +39,7 @@ "type": "git", "url": "git+https://github.com/zrwusa/data-structure-typed.git" }, - "author": "Tyler Zeng zrwusa@gmail.com", + "author": "Tyler Zeng ", "license": "MIT", "publishConfig": { "@zrwusa:registry": "https://npm.pkg.github.com" diff --git a/tsconfig.json b/tsconfig.json index 500c3ba..4b9d87a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,9 +1,9 @@ { "compilerOptions": { + "target": "ES6", + "module": "ES6", "outDir": "./lib", "declaration": true, - "module": "ES6", - "target": "ES6", "lib": [ "ESNext" ], diff --git a/tsconfig.prod.json b/tsconfig.prod.json index f0b1573..1776ab6 100644 --- a/tsconfig.prod.json +++ b/tsconfig.prod.json @@ -3,10 +3,11 @@ "target": "ES6", "module": "CommonJS", "outDir": "./dist", - "sourceMap": true, + "declaration": true, "lib": [ "ESNext" ], + "sourceMap": true, "strict": true, "downlevelIteration": true, "removeComments": true,