-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #155 from wordpress-mobile/try/update_to_rn_57_take_2
Update React Native to version 0.57
- Loading branch information
Showing
9 changed files
with
917 additions
and
862 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
module.exports = function( api ) { | ||
api.cache( true ); | ||
return { | ||
presets: [ | ||
'module:metro-react-native-babel-preset', | ||
], | ||
plugins: [ | ||
'react-require', | ||
'@babel/plugin-transform-async-to-generator', | ||
'@babel/plugin-proposal-async-generator-functions', | ||
'@babel/plugin-transform-runtime', | ||
'react-native-classname-to-style', | ||
[ | ||
'react-native-platform-specific-extensions', | ||
{ | ||
extensions: [ | ||
'css', | ||
'scss', | ||
'sass', | ||
], | ||
}, | ||
], | ||
], | ||
env: { | ||
development: { | ||
plugins: [ | ||
'@babel/transform-react-jsx-source', | ||
], | ||
}, | ||
}, | ||
}; | ||
}; |
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 |
---|---|---|
@@ -1,19 +1,18 @@ | ||
/** @format */ | ||
const blacklist = require( 'metro' ).createBlacklist; | ||
const path = require( 'path' ); | ||
const blacklist = require( 'metro-config/src/defaults/blacklist' ); | ||
// Blacklist the nested GB filetree so modules are not resolved in duplicates, | ||
// both in the nested directory and the parent directory. | ||
const blacklistElements = blacklist( [ new RegExp( path.basename( __dirname ) + '/gutenberg/gutenberg-mobile/.*' ) ] ); | ||
const enm = require( './extra-node-modules.config.js' ); | ||
|
||
module.exports = { | ||
extraNodeModules: enm, | ||
getBlacklistRE: function() { | ||
// There's a nested checkout of the mobile code inside the Gutenberg repo | ||
// as a submodule. Blacklist it to avoid errors due to duplicate modules. | ||
return blacklist( [ new RegExp( path.basename( __dirname ) + '/gutenberg/gutenberg-mobile/.*/' ) ] ); | ||
resolver: { | ||
blacklistRE: blacklistElements, | ||
sourceExts: [ 'js', 'json', 'scss', 'sass' ], | ||
}, | ||
getTransformModulePath() { | ||
return require.resolve( './sass-transformer.js' ); | ||
}, | ||
getSourceExts() { | ||
return [ 'js', 'json', 'scss', 'sass' ]; | ||
transformer: { | ||
babelTransformerPath: require.resolve( './sass-transformer.js' ), | ||
}, | ||
}; |
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
Oops, something went wrong.