- add babel.config.js with unstable_transformImportMeta: zustand/middleware ships import.meta.env, which the Metro web bundle (a classic script) cannot parse, so every page threw 'SyntaxError: Cannot use import.meta outside a module' and the app never hydrated after the static export. - declare the settings screen as 'settings/index' in the root stack: the old name 'settings' matched no route, so the modal presentation and the 'Settings' title were silently dropped (expo-router logged 'No route named settings exists'). - add the missing app/+not-found.tsx that the root layout already referenced. - update the About label from LocalAiApp to LocalMind.
17 lines
460 B
JavaScript
17 lines
460 B
JavaScript
module.exports = function (api) {
|
|
api.cache(true);
|
|
return {
|
|
presets: [
|
|
[
|
|
'babel-preset-expo',
|
|
{
|
|
// Dependencias (zustand/middleware) usam `import.meta.env`, que nao existe
|
|
// no bundle web do Metro (script classico) e quebrava a hidratacao do app.
|
|
// O polyfill do Expo troca por `globalThis.__ExpoImportMetaRegistry`.
|
|
unstable_transformImportMeta: true,
|
|
},
|
|
],
|
|
],
|
|
};
|
|
};
|