Skip to content

Commit cb8733a

Browse files
committed
feat: mark motion external
1 parent f7b344e commit cb8733a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/blade/package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,6 @@
294294
"react-dom": ">=18",
295295
"styled-components": "^5",
296296
"framer-motion": ">=4",
297-
"motion": ">=11",
298297
"react-native": "^0.72",
299298
"@floating-ui/react-native": "^0.10.0",
300299
"react-native-reanimated": "^3.4.1",
@@ -314,9 +313,6 @@
314313
},
315314
"react-native-reanimated": {
316315
"optional": true
317-
},
318-
"motion": {
319-
"optional": true
320316
}
321317
},
322318
"resolutions": {

packages/blade/rollup.config.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ const nativeExtensions = [
5151
const packageJsonDeps = Object.keys(packagejson.dependencies).filter(
5252
(name) => name !== 'patch-package',
5353
);
54-
const externalDependencies = packageJsonDeps;
54+
55+
// `framer-motion` was renamed to `motion`. To support the older versions of framer-motion, we have kept `framer-motion` as peer dependency right now.
56+
// Although we also want to make sure that if someone installs `motion` instead, it should externalize correctly
57+
// 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)
58+
const externalDependencies = [...packageJsonDeps, 'motion'];
5559

5660
const inputRootDirectory = 'src';
5761
const outputRootDirectory = 'build';

0 commit comments

Comments
 (0)