Monorepo images don't load in development, but do load in the bundled application?

Please provide the following:

  1. SDK Version: 45.0.3 (but since at least SDK 42)
  2. Platforms(Android/iOS/web/all): Android 11/12 (maybe iOS affected too?)

All our JS code from similarly imported packages works fine in dev/prod both - but images only load in prod, given some code like this:

const lightLogo = require('media-includes/src/mobile/logo.png');

The app works fine in development except that there’s empty spaces where we’d expect images to be. Does anyone have any ideas about the cause?


related: Asset paths (httpServerLocation) invalid when asset is in watchFolders · Issue #290 · facebook/metro · GitHub


Haven’t tested that yet, but looks like the issue! Many thanks!

Confirmed the solution. Thanks again.

Sorry for new message - can’t find any way to edit.

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.