diff --git a/packages/framer-motion/rollup.config.mjs b/packages/framer-motion/rollup.config.mjs index 2ad0c0f985..5810ce58c0 100644 --- a/packages/framer-motion/rollup.config.mjs +++ b/packages/framer-motion/rollup.config.mjs @@ -89,7 +89,7 @@ const umdDomProd = Object.assign({}, umd, { }) const cjs = Object.assign({}, config, { - input: ["lib/index.js", "lib/dom-entry.js"], + input: "lib/index.js", output: { entryFileNames: `[name].js`, dir: "dist/cjs", @@ -101,6 +101,11 @@ const cjs = Object.assign({}, config, { external, }) +/** + * Bundle seperately so bundles don't share common modules + */ +const cjsDom = Object.assign({}, cjs, { input : "lib/dom-entry.js" }) + export const es = Object.assign({}, config, { input: ["lib/index.js", "lib/dom-entry.js", "lib/projection-entry.js"], output: { @@ -149,6 +154,7 @@ export default [ umdProd, umdDomProd, cjs, + cjsDom, es, types, animateTypes,