Update bundle.js
This commit is contained in:
parent
a9ffa4eefd
commit
fd3b9f1ebc
@ -378,6 +378,23 @@ export const commands = {
|
|||||||
require('metro-bundler/src/babelRegisterOnly');
|
require('metro-bundler/src/babelRegisterOnly');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ref: https://github.com/ds300/react-native-typescript-transformer/blob/master/index.js#L20
|
||||||
|
if (major === 0) {
|
||||||
|
if (minor >= 52) {
|
||||||
|
require('metro/src/babelRegisterOnly');
|
||||||
|
} else if (minor >= 47) {
|
||||||
|
require('metro-bundler/src/babelRegisterOnly');
|
||||||
|
} else if (minor === 46) {
|
||||||
|
require('metro-bundler/build/babelRegisterOnly');
|
||||||
|
} else {
|
||||||
|
// handle RN <= 0.45
|
||||||
|
require(path.resolve('node_modules/react-native/packager/babelRegisterOnly'))([
|
||||||
|
/private-cli\/src/,
|
||||||
|
/local-cli/,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// This line fix issue #11
|
// This line fix issue #11
|
||||||
require(path.resolve('node_modules/react-native/local-cli/cli'));
|
require(path.resolve('node_modules/react-native/local-cli/cli'));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user