mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
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>
This commit is contained in:
@@ -1,7 +1,17 @@
|
||||
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: ["babel-preset-expo"],
|
||||
presets: [expoPreset],
|
||||
plugins: [
|
||||
[
|
||||
"react-native-unistyles/plugin",
|
||||
|
||||
Reference in New Issue
Block a user