Skip to content

Instantly share code, notes, and snippets.

View shrey18111's full-sized avatar

Shrey Gupta shrey18111

View GitHub Profile
@shrey18111
shrey18111 / rn-cli.config.js
Last active July 11, 2019 23:15
Metro setup for importing assets from parent directory
let path = require("path")
module.exports = {
getTransformModulePath() {
return require.resolve("react-native-typescript-transformer")
},
sourceExts: ["ts", "tsx"],
// Set projectRoot to the web front-end root (Realization 1 above)
projectRoot: path.resolve(__dirname, "../assets/javascripts"),
// Set watchFolders to include the current directory, parent node_modules