Skip to content

Commit 5bb27e9

Browse files
authored
chore(web): Fix start:web (#488)
1 parent af0677c commit 5bb27e9

File tree

4 files changed

+3892
-183
lines changed

4 files changed

+3892
-183
lines changed

example/examples/MergeItem.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,15 +217,21 @@ export default class Merge extends Component<Props, State> {
217217
<Button
218218
testID="setDelegate_button"
219219
title="Set native delegate"
220-
disabled={!NativeModules.AsyncStorageTestSupport.test_setDelegate}
220+
disabled={
221+
!NativeModules.AsyncStorageTestSupport ||
222+
!NativeModules.AsyncStorageTestSupport.test_setDelegate
223+
}
221224
onPress={() =>
222225
NativeModules.AsyncStorageTestSupport.test_setDelegate(() => {})
223226
}
224227
/>
225228
<Button
226229
testID="unsetDelegate_button"
227230
title="Unset native delegate"
228-
disabled={!NativeModules.AsyncStorageTestSupport.test_unsetDelegate}
231+
disabled={
232+
!NativeModules.AsyncStorageTestSupport ||
233+
!NativeModules.AsyncStorageTestSupport.test_unsetDelegate
234+
}
229235
onPress={() =>
230236
NativeModules.AsyncStorageTestSupport.test_unsetDelegate(() => {})
231237
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
"devDependencies": {
6868
"@babel/core": "^7.6.2",
6969
"@babel/runtime": "^7.6.2",
70+
"@expo/webpack-config": "^0.12.0",
7071
"@react-native-community/bob": "^0.14.0",
7172
"@react-native-community/cli": "^4.5.1",
7273
"@react-native-community/cli-platform-android": "^4.5.1",

webpack.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const createExpoWebpackConfigAsync = require('@expo/webpack-config');
2+
3+
module.exports = async function(env, argv) {
4+
const config = await createExpoWebpackConfigAsync(env, argv);
5+
config.resolve.alias['@react-native-async-storage/async-storage'] = __dirname;
6+
return config;
7+
};

0 commit comments

Comments
 (0)