mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
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.
This commit is contained in:
parent
63e3262f2f
commit
e3bf20cbcf
|
@ -5,7 +5,9 @@
|
|||
// This function returns paths relative to the top-level 'node_modules'
|
||||
// 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.
|
||||
export default (moduleRequire) => (path) => {
|
||||
|
|
Loading…
Reference in a new issue