Skip to content

Commit

Permalink
refactor: back to og replace with regex
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Hunt <hello@alexhunt.io>
  • Loading branch information
byCedric and huntie committed Sep 30, 2022
1 parent 33d765d commit 5fa03ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/metro/src/lib/contextModuleTemplates.js
Expand Up @@ -28,7 +28,7 @@ function createFileMap(
let filePath = path.relative(modulePath, file);

if (os.platform() === 'win32') {
filePath = filePath.replaceAll(path.sep, '/');
filePath = filePath.replace(/\\/g, '/');
}

// NOTE(EvanBacon): I'd prefer we prevent the ability for a module to require itself (`require.context('./')`)
Expand Down

0 comments on commit 5fa03ad

Please sign in to comment.