Commit e3bf20cb authored by Joe Lutz's avatar Joe Lutz Committed by Arunoda Susiripala

Fix relative module aliases for Windows (#1249)

* Fix relative module aliases for Windows

* Update regular expressions to use `path.sep` instead of `[\\/]`

* Make the minimal changes possible.
parent 63e3262f
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
// This function returns paths relative to the top-level 'node_modules' // This function returns paths relative to the top-level 'node_modules'
// directory found in the path. If none is found, returns the complete path. // directory found in the path. If none is found, returns the complete path.
const RELATIVE_START = 'node_modules/' import { sep } from 'path'
const RELATIVE_START = `node_modules${sep}`
// Pass in the module's `require` object since it's module-specific. // Pass in the module's `require` object since it's module-specific.
export default (moduleRequire) => (path) => { export default (moduleRequire) => (path) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment