skypackjs / skypack-cdn

An issue tracker for the CDN
107 stars 5 forks source link

Module fbjs@3.0.0 does not provide export named canUseDOM #231

Open nifgraup opened 3 years ago

nifgraup commented 3 years ago

import { Text, View } from "https://cdn.skypack.dev/react-native-web";

Shows in console:

Uncaught SyntaxError: The requested module '/-/fbjs@v3.0.0-uRXtD519Hzu2In8XmTya/dist=es2020,mode=imports/unoptimized/lib/ExecutionEnvironment.js' does not provide an export named 'canUseDOM'

nifgraup commented 3 years ago

I opened up a pull request in react-native-web where the default export is used instead https://github.com/necolas/react-native-web/pull/2149, but would it be reasonable for skypack to work around this?

nifgraup commented 3 years ago

esm.sh does provide named exports https://cdn.esm.sh/v54/fbjs@3.0.1/es2021/lib/ExecutionEnvironment.js