Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
process.env.NODE_ENV === 'production'
? {}
: {
/**
* Latest `react-proxy` version does not contain try/catches from
* commit 981815dca250373619138c9f5aadf12295cf1b3f.
*/
'react-proxy': '@zamotany/react-proxy',
},
plugins: [
/**
* React Native uses a module system called Haste
* React Native uses haste internally, and additional RN
* platform's require additional packages also provide haste modules
*/
new HasteResolver({
directories: providesModuleNodeModules.map((_: any) => {
if (typeof _ === 'string') {
if (_ === 'react-native') {
return path.join(
resolveModule(root, 'react-native'),
'Libraries'
);
}
return resolveModule(root, _);
}
return path.join(resolveModule(root, _.name), _.directory);
}),
hasteOptions: hasteOptions || {},
}),
/**
* This is required by asset loader to resolve extra scales
},
__DEV__: dev,
}),
new webpack.LoaderOptionsPlugin({
minimize: !!minify,
debug: dev,
}),
],
resolve: {
plugins: [
/**
* React Native uses a module system called Haste
* React Native uses haste internally, and additional RN
* platform's require additional packages also provide haste modules
*/
new HasteResolver({
directories: providesModuleNodeModules.map((_: any) => {
if (typeof _ === 'string') {
if (_ === 'react-native') {
return path.join(
resolveModule(root, 'react-native'),
'Libraries'
);
}
return resolveModule(root, _);
}
return path.join(resolveModule(root, _.name), _.directory);
}),
hasteOptions: hasteOptions || {},
}),
/**
* This is required by asset loader to resolve extra scales