-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #206 from eventualbuddha/fix/compat
fix: make module compatible with import & require
- Loading branch information
Showing
1 changed file
with
7 additions
and
3 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 |
---|---|---|
|
@@ -18,15 +18,19 @@ | |
"license": "MIT", | ||
"author": "Brian Donovan <[email protected]>", | ||
"type": "module", | ||
"exports": "./build/index.js", | ||
"main": "./build/index.cjs", | ||
"exports": { | ||
"import": "./build/index.mjs", | ||
"require": "./build/index.cjs" | ||
}, | ||
"types": "./build/index.d.ts", | ||
"files": [ | ||
"build" | ||
], | ||
"scripts": { | ||
"prebuild": "rm -rf build", | ||
"build": "tsc --build tsconfig.build.json", | ||
"build:watch": "tsc --build tsconfig.build.json --watch", | ||
"build": "tsc --project tsconfig.build.json && mv build/index.js build/index.mjs && tsc --project tsconfig.build.json --module commonjs && mv build/index.js build/index.cjs", | ||
"build:watch": "tsc --project tsconfig.build.json --watch", | ||
"lint": "eslint .", | ||
"lint:fix": "eslint . --fix", | ||
"prepublishOnly": "npm run lint && npm run build", | ||
|