mirror of https://github.com/rollup/rollup.git
Properly handle upper directories as external dependencies (#4419)
* Allow external directory imports * Allow external directory imports * Fix plugin name * Test on Windows * Test on Windowspull/4429/head
parent
b74cb92e84
commit
0b60dd8eab
@ -0,0 +1,11 @@
|
||||
module.exports = {
|
||||
description: 'handles using ../ as external import (#4349)',
|
||||
options: {
|
||||
external() {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
context: {
|
||||
require: id => id
|
||||
}
|
||||
};
|
@ -0,0 +1,13 @@
|
||||
import foo1 from './';
|
||||
import foo2 from '../';
|
||||
import foo3 from '.';
|
||||
import foo4 from '..';
|
||||
import foo5 from './index.js';
|
||||
import foo6 from '../index.js';
|
||||
|
||||
assert.strictEqual(foo1, '.');
|
||||
assert.strictEqual(foo2, '..');
|
||||
assert.strictEqual(foo3, '.');
|
||||
assert.strictEqual(foo4, '..');
|
||||
assert.strictEqual(foo5, './index.js');
|
||||
assert.strictEqual(foo6, '../index.js');
|
Loading…
Reference in new issue