Skip to content

Commit f0c43ca

Browse files
dchamberswtrocki
authored andcommittedOct 12, 2020
Add CommonJs Support
1 parent db03990 commit f0c43ca

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed
 

‎package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"Peggy Rayzis <peggy@meteor.com>"
99
],
1010
"license": "MIT",
11-
"main": "./lib/index.js",
11+
"main": "./lib/cjs/index.js",
1212
"module": "./lib/index.js",
1313
"jsnext:main": "./lib/index.js",
1414
"typings": "./lib/index.d.ts",
@@ -20,7 +20,7 @@
2020
"bugs": "https://github.com/apollographql/apollo-cache-persist/issues",
2121
"scripts": {
2222
"build:browser": "browserify ./lib/bundle.umd.js -o=./lib/bundle.js && npm run minify:browser",
23-
"build": "tsc -p .",
23+
"build": "tsc -p . && tsc -p ./tsconfig.cjs.json",
2424
"bundle": "rollup -c",
2525
"clean": "rimraf lib/* && rimraf coverage/*",
2626
"coverage:upload": "codecov",

‎tsconfig.cjs.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "lib/cjs",
5+
"module": "commonjs"
6+
}
7+
}

0 commit comments

Comments
 (0)
Please sign in to comment.