From 450cd5c4064793a6a57bc4ff8051f62eeb0d0b93 Mon Sep 17 00:00:00 2001 From: DengYun Date: Fri, 18 Sep 2015 15:12:59 -0700 Subject: [PATCH] Generate module name seperated by '/' on Windows. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: I think packager on different platform should generate same output if possible. So packager should replace '\\' in module name with '/' on Windows. Closes https://github.com/facebook/react-native/pull/2813 Reviewed By: @​svcscm Differential Revision: D2458634 Pulled By: @martinbigio --- packager/react-packager/src/DependencyResolver/Module.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packager/react-packager/src/DependencyResolver/Module.js b/packager/react-packager/src/DependencyResolver/Module.js index 745ab3fb0..b34a2568d 100644 --- a/packager/react-packager/src/DependencyResolver/Module.js +++ b/packager/react-packager/src/DependencyResolver/Module.js @@ -56,7 +56,7 @@ class Module { return this.path; } - return path.join(name, path.relative(p.root, this.path)); + return path.join(name, path.relative(p.root, this.path)).replace(/\\/g, '/'); }); }) );