Closed the-unknown closed 10 months ago
Not sure why... it works recursively in my own projects.
You know, the function is very simple, and implemented in TypeScript layer:
https://github.com/birdofpreyru/react-native-static-server/blob/142ededf6429ff183ad603891069c6894064d5e6/src/index.tsx#L398-L412
why you just don't add some debug output directly into its source, within your node_modules
, and figure out what is wrong there? Is there anything special about that folder, maybe asset.isDirectory()
for some reason fails to classify it is as a directory?
ok, so I debugged this and it appears that a directory that starts with a "_" does not get recognized as directory and is just ignored.
When I rename it from _next
to next
it works.
This might be an issue with react-native-fs
I guess.
Yeah, it looks so, I should look into it in my fork of RNFS. Thanks for noticing it :)
Hey, I ran into strange behavior regarding asset-bundling. It seems that
extractBundledAssets()
will not extract sub-folders recursively.This is my assets-folder structure:![Screenshot of my assets-folder structure.](https://i.imgur.com/BbYTKsh.png)
As you can see, there is a
_next
sub-folder inside ofwebroot
, as I want to use a NextJS application. However, when I callawait extractBundledAssets(fileDir, 'webroot');
it will not extract the_next
sub-folder at all!This is my code:
This is the content of build.gradle
This is the result.