You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Uncaught TypeError: Failed to resolve module specifier "isomorphic-unfetch". Relative references must start with either "/", "./", or "../".`
If you change the library's import to something like ./node_modules/isomorphic-unfetch/es-version.js it'll work locally but of course break the built version. What to do? What is this rabbit hole?
Hey 🙂 I'm kinda new to rollup but also ran into this problem. The way I got around it is to use @rollup/plugin-node-resolve as a plugin when bundling modules for use in the browser, so that dependancies are all bundled up and no resolving is needed client-side. Something like:
Hi, if your library depends on an external package, how can you build for
<script type="module">
? Bonus points if you can make it work as CJS, too.Here's our library
Using rollup
es
format, can this work?Right now you it warns you
If you change the library's import to something like
./node_modules/isomorphic-unfetch/es-version.js
it'll work locally but of course break the built version. What to do? What is this rabbit hole?Any help would be great appreciated! Thank you.
Possibly related
The text was updated successfully, but these errors were encountered: