2023-04-26 10:06:18 +00:00
|
|
|
/* eslint-disable eslint-comments/disable-enable-pair */
|
2023-06-20 11:05:59 +00:00
|
|
|
/* eslint-disable import/default */
|
2023-04-26 10:06:18 +00:00
|
|
|
|
2023-06-21 10:35:48 +00:00
|
|
|
import './src/config/env.server.mjs'
|
|
|
|
import './src/config/env.client.mjs'
|
2023-06-20 11:05:59 +00:00
|
|
|
|
|
|
|
import tamagui_next_plugin from '@tamagui/next-plugin'
|
|
|
|
import { join } from 'node:path'
|
|
|
|
|
|
|
|
const { withTamagui } = tamagui_next_plugin
|
2023-04-26 10:06:18 +00:00
|
|
|
|
|
|
|
/** @type {import('next').NextConfig} */
|
|
|
|
let config = {
|
2023-05-03 12:25:17 +00:00
|
|
|
// output: 'export',
|
2023-04-26 10:06:18 +00:00
|
|
|
reactStrictMode: true,
|
|
|
|
typescript: {
|
|
|
|
ignoreBuildErrors: true,
|
|
|
|
},
|
|
|
|
images: {
|
2023-05-16 09:57:15 +00:00
|
|
|
// disableStaticImages: true,
|
2023-04-26 10:06:18 +00:00
|
|
|
},
|
|
|
|
transpilePackages: [
|
|
|
|
// 'react-native',
|
|
|
|
'react-native-web',
|
|
|
|
// 'expo-modules-core',
|
|
|
|
'expo-blur',
|
|
|
|
// '@status-im/components',
|
|
|
|
// '@status-im/js',
|
|
|
|
],
|
|
|
|
experimental: {
|
|
|
|
legacyBrowsers: false,
|
|
|
|
// esmExternals: 'loose',
|
2023-06-27 09:40:09 +00:00
|
|
|
scrollRestoration: true,
|
2023-04-26 10:06:18 +00:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
const plugins = [
|
|
|
|
withTamagui({
|
|
|
|
config: './tamagui.config.ts',
|
|
|
|
components: [
|
|
|
|
// fixme?: works without it
|
|
|
|
// '@status-im/icons',
|
|
|
|
'@status-im/components',
|
|
|
|
// './node_modules/@status-im/components/packages/components/dist',
|
|
|
|
],
|
|
|
|
importsWhitelist: ['constants.js', 'colors.js'],
|
|
|
|
logTimings: true,
|
|
|
|
disableExtraction: true,
|
|
|
|
// experiment - reduced bundle size react-native-web
|
|
|
|
useReactNativeWebLite: false,
|
|
|
|
shouldExtract: path => {
|
|
|
|
if (path.includes(join('packages', 'app'))) {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
excludeReactNativeWebExports: [
|
|
|
|
'Switch',
|
|
|
|
'ProgressBar',
|
|
|
|
'Picker',
|
|
|
|
'CheckBox',
|
|
|
|
'Touchable',
|
|
|
|
'Modal',
|
|
|
|
],
|
|
|
|
}),
|
|
|
|
]
|
|
|
|
|
2023-06-20 11:05:59 +00:00
|
|
|
export default () => {
|
2023-04-26 10:06:18 +00:00
|
|
|
for (const plugin of plugins) {
|
|
|
|
config = {
|
|
|
|
...config,
|
|
|
|
...plugin(config),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return config
|
|
|
|
}
|