Skip to content

Commit

Permalink
feat: mark motion external
Browse files Browse the repository at this point in the history
  • Loading branch information
saurabhdaware committed Dec 10, 2024
1 parent f7b344e commit cb8733a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 0 additions & 4 deletions packages/blade/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@
"react-dom": ">=18",
"styled-components": "^5",
"framer-motion": ">=4",
"motion": ">=11",
"react-native": "^0.72",
"@floating-ui/react-native": "^0.10.0",
"react-native-reanimated": "^3.4.1",
Expand All @@ -314,9 +313,6 @@
},
"react-native-reanimated": {
"optional": true
},
"motion": {
"optional": true
}
},
"resolutions": {
Expand Down
6 changes: 5 additions & 1 deletion packages/blade/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ const nativeExtensions = [
const packageJsonDeps = Object.keys(packagejson.dependencies).filter(
(name) => name !== 'patch-package',
);
const externalDependencies = packageJsonDeps;

// `framer-motion` was renamed to `motion`. To support the older versions of framer-motion, we have kept `framer-motion` as peer dependency right now.
// Although we also want to make sure that if someone installs `motion` instead, it should externalize correctly
// We cannot mark `motion` and `framer-motion` both as peer dependencies because `motion` might end up installing different `framer-motion` version internally which can end up clashing (TLDR: I tried and it didn't work)
const externalDependencies = [...packageJsonDeps, 'motion'];

const inputRootDirectory = 'src';
const outputRootDirectory = 'build';
Expand Down

0 comments on commit cb8733a

Please sign in to comment.