Skip to content

Commit fdc982b

Browse files
committed
Publish src directory as esmodule
1 parent cf7a997 commit fdc982b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ dist
33
coverage
44
npm-debug.log
55
yarn-error.log
6+
dist-es

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@
33
"version": "1.1.2",
44
"description": "Deep diffs two objects, including nested structures of arrays and objects, and return the difference.",
55
"main": "dist/index.js",
6+
"module": "dist-es/index.js",
67
"types": "./index.d.ts",
78
"files": [
89
"dist",
10+
"dist-es",
911
"index.d.ts",
1012
"README.md"
1113
],
1214
"scripts": {
13-
"build": "babel src -d dist --ignore \"**/*.test.js\"",
15+
"build": "babel src -d dist --ignore \"**/*.test.js\" && yarn build:esmodule",
16+
"build:esmodule": "rm -rf dist-es && mkdir dist-es && cp -r src/* dist-es && rm -rf dist-es/**/*.test.js",
1417
"prepublish": "yarn build",
1518
"lint": "eslint src",
1619
"test": "jest",

0 commit comments

Comments
 (0)