Metro Bundler cannot find .hidden.js files. #24020
Labels
Bug
Resolution: Locked
This issue was locked by the bot.
Tech: Bundler 📦
This issue is related to the bundler (Metro, Haul, etc) used.
🐛 Bug Report
Everytime I tried to compile a release build for android, the bundler would always error at the same point - unable to resolve a
require('../.env.js')
statement in one of the component files.I have double checked the filepath - it is correct.
I have double checked the metro/src/blacklist.js - there is no explicit blacklist of hidden javascript files.
The hidden file is in the rootProject directory - It should be picked up and not 'outside' the project
The metro bundler picks up the .env.js file in developer mode though, just not in release. I ended up having to unhide the file for the bundler to pick it up and compile a release apk.
I should note that I recently upgraded from react native 0.38 => react-native 0.59.1. So maybe the upgrade process is the reason why the ./gradlew assembleRelease doesn't work with the hidden env file.
To Reproduce
Expected Behavior
Code Example
Environment
package.json dependencies:
The text was updated successfully, but these errors were encountered: