Browse Source

use path.relative inside relativeId, to try and fix tests on windows

gh-786
Rich-Harris 8 years ago
parent
commit
b1a9abc261
  1. 6
      src/utils/relativeId.js

6
src/utils/relativeId.js

@ -1,4 +1,6 @@
import { isAbsolute, relative } from './path.js';
export default function relativeId ( id ) {
if ( typeof process === 'undefined' ) return id;
return id.replace( process.cwd(), '' ).replace( /^[\/\\]/, '' );
if ( typeof process === 'undefined' || !isAbsolute( id ) ) return id;
return relative( process.cwd(), id );
}

Loading…
Cancel
Save