-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using metro for bundler prevents web from loading packages #650
Comments
Running into the same issue with this package. Just migrated from Webpack. |
This appears to be a problem with {
"name": "@legendapp/motion",
"version": "2.2.0",
"description": "legend-motion",
"sideEffects": false,
"main": "dist/commonjs/",
"module": "dist/module/", // Metro Web will use the `module` resolution - THIS PATH DOES NOT EXIST
"types": "index.d.ts",
"react-native": "src/",
"source": "src/",
"exports": { // Webpack supports exports, so it will use these paths
".": "./index.js",
"./svg": "./svg.js",
"./linear-gradient": "./linear-gradient.js",
"./linear-gradient-expo": "./linear-gradient-expo.js",
"./styled": "./styled.js",
"./package.json": "./package.json"
}, Correcting the
So now it is correctly loading the package but the
This file does not exist. Changing it to @jmeistrich Tagging you as this appears to be across multiple legendapp packages |
Thanks @marklawlor! I will fix those packages. |
I think this should be fixed in @legendapp/motion version 2.2.1. If not, please update in the legend-motion issue: LegendApp/legend-motion#12 |
I am not able to load {
"main": "./dist/hls.js",
"module": "./dist/hls.mjs",
"types": "./dist/hls.js.d.ts",
} Especially Can we re-open the issue @marklawlor ? UPDATE Same for |
@eightyfive What package is having an issue with |
No legend-motion involved indeed. I am just importing Works with SDK 48 (webpack), fails with SDK 49 (metro). I'm not too fluent about metro for web bundling. Someone mentioned above it is using the |
Experiencing this issue with |
Which package manager are you using? (Yarn is recommended)
yarn
Summary
I'm using the metro bundler for web, as recommended. I'm trying to use gluestack-style which has a dependency of
@legendapp/motion
. It all works fine on iOS/android but it fails to resolve on webUnable to resolve "@legendapp/motion" from
. I believe this is because the package hasn't been transpiled.I've found how you can achieve this for webpack, but haven't found any documentation on how to achieve this, while using Metro for web.
Minimal reproducible example
//app.json
"web": {
"bundler": "metro",
}
// app.tsx
import { AnimatePresence } from '@legendapp/motion';
The text was updated successfully, but these errors were encountered: