Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(examples): allow project node_modules to be used #2200

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Example/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ const modules = [

const resolvedExts = ['.ts', '.tsx', '.js', '.jsx'];

const projectNodeModules = path.join(__dirname, 'node_modules');

const config = {
projectRoot: __dirname,
watchFolders: [rnsRoot],
Expand All @@ -42,7 +44,7 @@ const config = {
return acc;
}, {}),

nodeModulesPaths: [path.join(__dirname, '../../')],
nodeModulesPaths: [projectNodeModules, path.join(__dirname, '../../')],

// Since we use react-navigation as submodule it comes with it's own node_modules. While loading
// react-navigation code, due to how module resolution algorithms works it seems that its node_modules
Expand Down
4 changes: 3 additions & 1 deletion FabricExample/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ const modules = [

const resolvedExts = ['.ts', '.tsx', '.js', '.jsx'];

const projectNodeModules = path.join(__dirname, 'node_modules');

const config = {
projectRoot: __dirname,
watchFolders: [rnsRoot],
Expand All @@ -41,7 +43,7 @@ const config = {
return acc;
}, {}),

nodeModulesPaths: [path.join(__dirname, '../../')],
nodeModulesPaths: [projectNodeModules, path.join(__dirname, '../../')],

// Since we use react-navigation as submodule it comes with it's own node_modules. While loading
// react-navigation code, due to how module resolution algorithms works it seems that its node_modules
Expand Down
4 changes: 3 additions & 1 deletion FabricTestExample/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ const modules = [

const resolvedExts = ['.ts', '.tsx', '.js', '.jsx'];

const projectNodeModules = path.join(__dirname, 'node_modules');

const config = {
projectRoot: __dirname,
watchFolders: [rnsRoot],
Expand All @@ -41,7 +43,7 @@ const config = {
return acc;
}, {}),

nodeModulesPaths: [path.join(__dirname, '../../')],
nodeModulesPaths: [projectNodeModules, path.join(__dirname, '../../')],

// Since we use react-navigation as submodule it comes with it's own node_modules. While loading
// react-navigation code, due to how module resolution algorithms works it seems that its node_modules
Expand Down
4 changes: 3 additions & 1 deletion TVOSExample/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ const modules = [

const resolvedExts = ['.ts', '.tsx', '.js', '.jsx'];

const projectNodeModules = path.join(__dirname, 'node_modules');

const config = {
projectRoot: __dirname,
watchFolders: [rnsRoot],
Expand All @@ -42,7 +44,7 @@ const config = {
return acc;
}, {}),

nodeModulesPaths: [path.join(__dirname, '../../')],
nodeModulesPaths: [projectNodeModules, path.join(__dirname, '../../')],

// Since we use react-navigation as submodule it comes with it's own node_modules. While loading
// react-navigation code, due to how module resolution algorithms works it seems that its node_modules
Expand Down
4 changes: 3 additions & 1 deletion TestsExample/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ const modules = [

const resolvedExts = ['.ts', '.tsx', '.js', '.jsx'];

const projectNodeModules = path.join(__dirname, 'node_modules');

const config = {
projectRoot: __dirname,
watchFolders: [rnsRoot],
Expand All @@ -41,7 +43,7 @@ const config = {
return acc;
}, {}),

nodeModulesPaths: [path.join(__dirname, '../../')],
nodeModulesPaths: [projectNodeModules, path.join(__dirname, '../../')],

// Since we use react-navigation as submodule it comes with it's own node_modules. While loading
// react-navigation code, due to how module resolution algorithms works it seems that its node_modules
Expand Down
Loading