Browse Source

add test for #633

gh-669
Rich-Harris 8 years ago
parent
commit
9d6dedf78e
  1. 18
      test/function/external-normalization/_config.js
  2. 2
      test/function/external-normalization/main.js

18
test/function/external-normalization/_config.js

@ -0,0 +1,18 @@
var path = require( 'path' );
var assert = require( 'assert' );
module.exports = {
description: 'external paths from custom resolver remain external (#633)',
options: {
external: [ 'path' ],
plugins: [{
resolveId: ( id ) => {
if ( id == './dep.js' ) return 'path';
return id;
}
}]
},
exports: exports => {
assert.equal( exports, path.resolve );
}
};

2
test/function/external-normalization/main.js

@ -0,0 +1,2 @@
import { resolve } from './dep.js';
export default resolve;
Loading…
Cancel
Save