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
I had hoped to see the "www" directory preserved in the asset path on-device. What I see instead is:
Android: an asset path of custom/test.html
IOS: the file is plopped right into the .app, e.g.: /Library/Developer/CoreSimulator/Devices/28BE7070-4C6C-44C4-BBA4-2E08DDFF77F2/data/Containers/Bundle/Application/1FC5CCB6-981B-4BCA-861B-138B68B6FBE8/Foobar.app/test.html
Is this expected behavior? Is it possible to preserve my www directory on both platforms?
The text was updated successfully, but these errors were encountered:
As for iOS, it's creates a link to the original file so no need to actually copy it, the path you have shown is just the path that the bundlers copies linked files.
As for android, there are 3 paths possible to be copied to:
Fonts - will copy to path.resolve(androidPath, 'app', 'src', 'main', 'assets', 'fonts') because as I remember, that's where the fonts should go when adding custom font for react native for android.
sound - will copy to path.resolve(androidPath, 'app', 'src', 'main', 'res', 'raw') because that's what the documentation says sound files should go to.
custom - will copy to path.resolve(androidPath, 'app', 'src', 'main', 'assets', 'custom'), I just added this because I figured it could be of use for some people.
As for 1. and 2., I believe the files needs to be copied shallowly (without folders) in order to work, as for 3., I just implemented it the same as 1. and 2. out of laziness.
It's possible to change the behaviour for custom files (and that's will be a breaking change, just mentioning it for future self if the change will be published), and anyone is welcome to PR the change, I can't do that in the near future though, school stuff.
Given config:
And the following files on disk:
I had hoped to see the "www" directory preserved in the asset path on-device. What I see instead is:
custom/test.html
/Library/Developer/CoreSimulator/Devices/28BE7070-4C6C-44C4-BBA4-2E08DDFF77F2/data/Containers/Bundle/Application/1FC5CCB6-981B-4BCA-861B-138B68B6FBE8/Foobar.app/test.html
Is this expected behavior? Is it possible to preserve my
www
directory on both platforms?The text was updated successfully, but these errors were encountered: