Skip to content

Commit

Permalink
feat(core): add commonjs output format (#4064)
Browse files Browse the repository at this point in the history
  • Loading branch information
imhoffd committed Jan 13, 2021
1 parent 531332c commit 74b7be8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"types/",
"cordova.js"
],
"main": "dist/index.js",
"main": "dist/index.cjs.js",
"module": "dist/index.js",
"types": "types/index.d.ts",
"unpkg": "dist/capacitor.js",
"scripts": {
Expand Down
7 changes: 7 additions & 0 deletions core/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ export default {
banner,
sourcemap: true,
},
{
file: 'dist/index.cjs.js',
format: 'cjs',
banner,
sourcemap: true,
inlineDynamicImports: true,
},
],
plugins: [nodeResolve()],
};

0 comments on commit 74b7be8

Please sign in to comment.