Skip to content

Commit 2d7a3ec

Browse files
authored
feat(package.json): Export es modules (#54)
Preserve import/export statements so users can take advantage of tree shaking Fixes #29
1 parent 2af96f5 commit 2d7a3ec

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
es/
12
node_modules/
23
lib/
34
dist/

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "0.3.0",
44
"description": "A react display ad component using Google Publisher Tag",
55
"main": "lib/index.js",
6+
"jsnext:main": "es/index.js",
67
"contributors": [
78
{
89
"name": "NFL Engineering"
@@ -97,6 +98,7 @@
9798
"commit": "git-cz",
9899
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
99100
"build": "npm run clean && npm run compile",
101+
"build:es": "BABEL_ENV=es babel --copy-files ./src -d es",
100102
"build:umd":
101103
"NODE_ENV=development webpack src/index.js dist/react-gpt.js",
102104
"build:umd:min":
@@ -111,7 +113,7 @@
111113
"npm run build && env BABEL_ENV=examples node examples/server/index.js",
112114
"pretest": "npm run build",
113115
"prepublish":
114-
"npm run build && npm run build:umd && npm run build:umd:min",
116+
"npm run build && npm run build:es && npm run build:umd && npm run build:umd:min",
115117
"test": "npm run lint && karma start",
116118
"update-apilist": "node ./scripts/updateAPIList.js"
117119
},

0 commit comments

Comments
 (0)