This repository has been archived by the owner on Feb 8, 2020. It is now read-only.
generated from satya164/typescript-template
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make it possible to run the example on web
- Loading branch information
Showing
10 changed files
with
186 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// @ts-ignore | ||
import TouchableBounce from 'react-native/Libraries/Components/Touchable/TouchableBounce'; | ||
|
||
export default TouchableBounce; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { TouchableOpacity } from 'react-native'; | ||
|
||
export default TouchableOpacity; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
const path = require('path'); | ||
const fs = require('fs'); | ||
const createExpoWebpackConfigAsync = require('@expo/webpack-config'); | ||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin'); | ||
|
||
module.exports = async function(env, argv) { | ||
const config = await createExpoWebpackConfigAsync(env, argv); | ||
|
||
config.module.rules.push({ | ||
test: /\.(js|ts|tsx)$/, | ||
include: /packages\/.+/, | ||
use: 'babel-loader', | ||
}); | ||
|
||
config.resolve.plugins = config.resolve.plugins.filter( | ||
p => !(p instanceof ModuleScopePlugin) | ||
); | ||
|
||
config.resolve.alias['react'] = path.resolve( | ||
__dirname, | ||
'node_modules', | ||
'react' | ||
); | ||
config.resolve.alias['react-native'] = path.resolve( | ||
__dirname, | ||
'node_modules', | ||
'react-native-web' | ||
); | ||
config.resolve.alias['react-native-web'] = path.resolve( | ||
__dirname, | ||
'node_modules', | ||
'react-native-web' | ||
); | ||
|
||
config.resolve.alias[ | ||
'@expo/vector-icons/MaterialCommunityIcons' | ||
] = require.resolve('@expo/vector-icons/MaterialCommunityIcons'); | ||
|
||
fs.readdirSync(path.join(__dirname, '..')).forEach(name => { | ||
config.resolve.alias[`@react-navigation/${name}`] = path.resolve( | ||
__dirname, | ||
'..', | ||
name, | ||
'src' | ||
); | ||
}); | ||
|
||
return config; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/material-bottom-tabs/src/views/MaterialBottomTabView.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.