Skip to content

Commit

Permalink
Fix plugin name
Browse files Browse the repository at this point in the history
  • Loading branch information
lukastaegert committed Feb 27, 2022
1 parent b963910 commit b107be0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build-plugins/esm-dynamic-import.ts
@@ -1,6 +1,6 @@
import type { Plugin } from 'rollup';

export default function addBinShebangAndEsmImport(): Plugin {
export default function esmDynamicImport(): Plugin {
let importFound = false;
return {
generateBundle() {
Expand Down
6 changes: 2 additions & 4 deletions test/misc/misc.js
Expand Up @@ -242,11 +242,9 @@ console.log(x);
});
assert.strictEqual(main.fileName, 'base/main');
assert.strictEqual(feature.fileName, 'base/main/feature');
assert.match(feature.code, /^import { fn } from '\.\.\/main'/);
assert.ok(feature.code.startsWith("import { fn } from '../main'"));
assert.strictEqual(subfeature.fileName, 'base/main/feature/sub');
assert.match(subfeature.code, /^import { fn } from '\.\.\/\.\.\/main'/);
assert.strictEqual(subsubfeature.fileName, 'base/main/feature/sub/sub');
assert.match(subsubfeature.code, /^import { fn } from '\.\.\/\.\.\/\.\.\/main'/);
assert.ok(subfeature.code.startsWith("import { fn } from '../../main'"));
assert.strictEqual(subsubfeature.fileName, 'base/main/feature/sub/sub');
assert.ok(subsubfeature.code.startsWith("import { fn } from '../../../main'"));
});
Expand Down

0 comments on commit b107be0

Please sign in to comment.