Files
pezkuwi-ui/packages/exampleReactNative/metro.config.js
T
Cameron Franz b3e9b70341 react-native example app port (#223)
* add readme

* react-native example app

* update readme

* add ios-cli dep

* revert package.json change

* update readme

* update readme

* don't auto launch metro

* add react native scripts

* nohoist @react-native-community/**

* update readme

* undo wrong README change

* remove react-native root dep

* copyright headers

* semi-style

* add default gitignore

* finish linting

* remove test for now

* fix typescript errors

* fix linting

* update scripts

* update deps and version

* update readme

* remove accidental dep

* update readme

* bump deps

* update yarn.lock

* actually update yarn.lock

* fix yarn.lock conflicts by updating exampleReactNative deps
2019-10-10 21:22:21 +02:00

38 lines
1.1 KiB
JavaScript

/* eslint-disable @typescript-eslint/no-var-requires */
const path = require('path');
const getWorkspaces = require('get-yarn-workspaces');
const workspaces = getWorkspaces(__dirname).filter(item => {
return path.normalize(item) !== path.normalize(__dirname);
});
let workspacesBuildDirs = workspaces.map(workspace => path.join(workspace, 'build/'));
workspacesBuildDirs = workspacesBuildDirs.filter(item => item !== path.join(__dirname, '../reactnative-identicon/build/'));
module.exports = {
// watch other packages as well as root node_modules
watchFolders: [
path.resolve(__dirname, '../../node_modules'),
...workspacesBuildDirs
],
// remap node packages to react-native packages
resolver: {
extraNodeModules: {
crypto: require.resolve('react-native-crypto'),
stream: require.resolve('stream-http'),
vm: require.resolve('vm-browserify'),
process: require.resolve('process'),
os: require.resolve('os-browserify')
}
},
transformer: {
getTransformOptions: () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false
}
})
}
};