Merged
Conversation
…eta support Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix import.meta support issue in Hermes
Enable import.meta polyfill for Hermes
Feb 26, 2026
There was a problem hiding this comment.
Pull request overview
This PR fixes a Hermes compatibility issue that prevented iOS and Android builds from working. The @objectstack/core@3.0.9 package uses import.meta.url which is not natively supported by Hermes (the JavaScript engine used by React Native). The fix moves the unstable_transformImportMeta Babel polyfill from web-specific configuration to the top-level babel-preset-expo config, enabling it for all platforms including iOS and Android.
Changes:
- Moves
unstable_transformImportMeta: truefrom nestedwebobject to top-level babel-preset-expo configuration, enabling the import.meta polyfill for iOS/Android platforms in addition to web
Comments suppressed due to low confidence (1)
babel.config.js:14
- According to the project's custom coding guidelines, development tasks should be followed by running tests and updating the ROADMAP. While this is a build configuration fix that enables iOS/Android builds to work, please verify that:
- Tests run successfully with this change (run
pnpm test) - Consider adding a note in ROADMAP.md about this Hermes compatibility fix for @objectstack/core@3.0.9
This ensures the project documentation stays current and the change doesn't break existing functionality.
unstable_transformImportMeta: true,
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@objectstack/coreusesimport.meta.urlwhich Hermes doesn't support natively. Theunstable_transformImportMetababel polyfill was only enabled under thewebkey, so iOS/Android builds failed.Moved the option to top-level babel-preset-expo config so it applies to all platforms:
Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.