Browse Source

Normalize absolute paths in default resolver

ghi-672
Bogdan Chadkin 9 years ago
parent
commit
ccbc11cce1
  1. 2
      src/utils/defaults.js
  2. 1
      test/form/absolute-path-resolver/_config.js

2
src/utils/defaults.js

@ -19,7 +19,7 @@ export function resolveId ( importee, importer ) {
if ( typeof process === 'undefined' ) throw new Error( `It looks like you're using Rollup in a non-Node.js environment. This means you must supply a plugin with custom resolveId and load functions. See https://github.com/rollup/rollup/wiki/Plugins for more information` );
// absolute paths are left untouched
if ( isAbsolute( importee ) ) return addJsExtensionIfNecessary( importee );
if ( isAbsolute( importee ) ) return addJsExtensionIfNecessary( resolve( importee ) );
// if this is the entry point, resolve against cwd
if ( importer === undefined ) return addJsExtensionIfNecessary( resolve( process.cwd(), importee ) );

1
test/form/absolute-path-resolver/_config.js

@ -1,7 +1,6 @@
var path = require('path');
module.exports = {
solo: true,
description: 'normalizes absolute ids',
options: {
plugins: [{

Loading…
Cancel
Save