Skip to content

Commit

Permalink
Fix/dom bundle (#2729)
Browse files Browse the repository at this point in the history
* Fixing DOM bundle config

* Adding comment
  • Loading branch information
mattgperry authored Jul 16, 2024
1 parent a0a3947 commit f1743cd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/framer-motion/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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: {
Expand Down Expand Up @@ -149,6 +154,7 @@ export default [
umdProd,
umdDomProd,
cjs,
cjsDom,
es,
types,
animateTypes,
Expand Down

0 comments on commit f1743cd

Please sign in to comment.