Files
paseo/packages/app/babel.config.js
Mohamed Boudra 6615b23c8b fix: apply import.meta transform to ALL platforms (web + native)
The previous fix only applied unstable_transformImportMeta to the native
platform, but Zustand 5's import.meta.env usage also breaks on web.

Moving the transform to the top level ensures it applies to both web and
native platforms, fixing the "Cannot use 'import.meta' outside a module"
error across all platforms.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 11:25:18 +00:00

25 lines
477 B
JavaScript

module.exports = function (api) {
api.cache(true);
const expoPreset = [
"babel-preset-expo",
{
// Transform `import.meta` for ALL platforms (web + native)
// Required for modern ESM deps like Zustand 5 that use import.meta.env
unstable_transformImportMeta: true,
},
];
return {
presets: [expoPreset],
plugins: [
[
"react-native-unistyles/plugin",
{
root: "src",
},
],
],
};
};