mcnamee / react-native-starter-kit

:rocket: A React Native boilerplate app to get you up and running very, very quickly :rocket:
MIT License
3.34k stars 863 forks source link

[Q] Any kinf of configuration available? #245

Closed trsh closed 4 years ago

trsh commented 4 years ago

I would like to configure how images are handled. Some are bundled under /static/media, some are represented as data: links. I think it depends on size. I would like to control this behavior.

mcnamee commented 4 years ago

I'm sorry, I'm not sure what you're asking. Would you mind clarifying what the issue is?

trsh commented 4 years ago

@mcnamee so if I do this on WEB side:

import x from '../../../images/cards-white-fill/y.png';
import x1 from '../../../images/cards-white-fill/y1.png';
...
<Media src={x} />
<Media src={x1} />

and then check the source of rendered dom. The links are <img src="/static/media/y-Q.ae974378.png" /> and <img src="data:image/png;base64,iVBORw....[longcode]" />

So there is some mechanism that decides to serve the image as file or a data string. My problem is that I see no configuration to have control over this process. That in turn prevents me to build any kind of image pre-loading, that we need for our project.

mcnamee commented 4 years ago

Gotcha. No this project doesn't implement any specific configuration on top of Create React App. However you could find out more by looking at https://github.com/facebook/create-react-app to see if the tool can do what you need