-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: dual build to emit both commonJS and ESM to maximize compatibility
- Loading branch information
1 parent
e710df2
commit 1d2a199
Showing
3 changed files
with
39 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
{ | ||
"name": "@optum/react-hooks", | ||
"version": "1.0.2-next.1", | ||
"version": "1.0.2-next.2", | ||
"description": "A reusable set of React hooks", | ||
"repository": "https://github.com/Optum/react-hooks", | ||
"license": "Apache 2.0", | ||
"main": "build/lib/es5/index.js", | ||
"module": "build/lib/es6/index.js", | ||
"sideEffects": false, | ||
"scripts": { | ||
"build": "tsc --project tsconfig.json", | ||
"build": "rm -rf build/lib && tsc && tsc --build tsconfig.es5.json", | ||
"prepack": "yarn build" | ||
}, | ||
"files": [ | ||
|
@@ -36,19 +38,6 @@ | |
"dependencies": { | ||
"tslib": "^2.3.1" | ||
}, | ||
"exports": { | ||
".": { | ||
"require": { | ||
"types": "./build/types/cjs/index.d.ts", | ||
"default": "./build/cjs/index.js" | ||
}, | ||
"types": "./build/types/cjs/index.d.ts", | ||
"default": "./build/cjs/index.js" | ||
} | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"stableVersion": "1.8.0-next.245", | ||
"packageManager": "[email protected]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "CommonJS", | ||
"target": "ES5", | ||
"lib": ["ES2020", "DOM"], | ||
"declaration": true, | ||
"outDir": "./build/lib/es5", | ||
"moduleResolution":"Node", | ||
"preserveSymlinks": true, | ||
"rootDir": ".", | ||
"sourceMap": true, | ||
"strict": true, | ||
"noImplicitReturns": true, | ||
"importHelpers": true, | ||
"noEmitHelpers": true, | ||
"noUnusedLocals": true, | ||
"jsx": "preserve", | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"esModuleInterop": true, | ||
"resolveJsonModule": true, | ||
"isolatedModules": true | ||
}, | ||
"exclude": ["node_modules"], | ||
"include": ["**/*.ts", "**/*.tsx"] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters