init: 初始化模板项目
This commit is contained in:
35
apps/expo/babel.config.js
Normal file
35
apps/expo/babel.config.js
Normal file
@@ -0,0 +1,35 @@
|
||||
module.exports = (api) => {
|
||||
api.cache(true)
|
||||
return {
|
||||
presets: [['babel-preset-expo', { jsxRuntime: 'automatic' }]],
|
||||
plugins: [
|
||||
[
|
||||
require.resolve('babel-plugin-module-resolver'),
|
||||
{
|
||||
root: ['../..'],
|
||||
alias: {
|
||||
// define aliases to shorten the import paths
|
||||
app: '../../packages/app',
|
||||
'@my/ui': '../../packages/ui',
|
||||
},
|
||||
extensions: ['.js', '.jsx', '.tsx', '.ios.js', '.android.js'],
|
||||
},
|
||||
],
|
||||
// if you want reanimated support
|
||||
// 'react-native-reanimated/plugin',
|
||||
...(process.env.EAS_BUILD_PLATFORM === 'android'
|
||||
? []
|
||||
: [
|
||||
[
|
||||
'@tamagui/babel-plugin',
|
||||
{
|
||||
components: ['@my/ui', 'tamagui'],
|
||||
config: '../../packages/config/src/tamagui.config.ts',
|
||||
logTimings: true,
|
||||
disableExtraction: process.env.NODE_ENV === 'development',
|
||||
},
|
||||
],
|
||||
]),
|
||||
],
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user