Skip to content

Commit

Permalink
Merge pull request #21 from Countly/roll
Browse files Browse the repository at this point in the history
Rollup cf
  • Loading branch information
turtledreams authored Dec 5, 2024
2 parents fe1649d + 8a646f7 commit 597e045
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
node_modules/
dist/
rollup.config.js
Countly.d.ts
src/
instrumented/
Expand Down
50 changes: 50 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

import resolve from "@rollup/plugin-node-resolve";
import babel from "@rollup/plugin-babel";

export default [
{
input: "./Countly.js",
output: [
{
file: "dist/countly_esm.js",
format: "esm",
name: "Countly",
sourcemap: true,
exports: "named",
extend: true,
globals: { crypto: "crypto", Countly: "Countly" },
},
{
file: "dist/countly_umd.js",
format: "umd",
name: "Countly",
sourcemap: true,
exports: "named",
extend: true,
globals: { crypto: "crypto", Countly: "Countly" },
},
{
file: "dist/countly_cjs.js",
format: "cjs",
name: "Countly",
sourcemap: true,
exports: "named",
extend: true,
globals: { crypto: "crypto", Countly: "Countly" },
},
],
plugins: [
resolve({
preferBuiltins: true,
}),
babel({
babelrc: false,
presets: ["@babel/preset-env"],
babelHelpers: "bundled",
// plugins : ["istanbul"] // use for code coverage
}),
],
}

];

0 comments on commit 597e045

Please sign in to comment.