Skip to content

Commit

Permalink
Merge branch 'v2' into bump-swc
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed May 11, 2022
2 parents 7e55659 + e68beeb commit 54f4ea8
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 0 deletions.
@@ -0,0 +1,3 @@
import b from './b';

output = b.foo + b.bar;
@@ -0,0 +1,2 @@
import * as c from './c';
export default c;
@@ -0,0 +1,2 @@
export foo from './d';
export const bar = require('./d');
@@ -0,0 +1 @@
module.exports = 1;
@@ -0,0 +1,3 @@
import {foo, bar} from './b';

output = foo + bar;
@@ -0,0 +1 @@
export * from './c';
@@ -0,0 +1,2 @@
export foo from './d';
export const bar = require('./d');
@@ -0,0 +1 @@
module.exports = 1;
22 changes: 22 additions & 0 deletions packages/core/integration-tests/test/scope-hoisting.js
Expand Up @@ -2014,6 +2014,28 @@ describe('scope hoisting', function () {
assert(new output[3]() instanceof output[2]);
});

it('should support chained reexports from hybrid modules', async function () {
let b = await bundle(
path.join(
__dirname,
'/integration/scope-hoisting/es6/re-export-hybrid/a.js',
),
);
let output = await run(b);
assert.strictEqual(output, 2);
});

it('should support chained reexports as default from hybrid modules', async function () {
let b = await bundle(
path.join(
__dirname,
'/integration/scope-hoisting/es6/re-export-default-hybrid/a.js',
),
);
let output = await run(b);
assert.strictEqual(output, 2);
});

it('support chained namespace reexports of CommonJS', async function () {
let b = await bundle(
path.join(
Expand Down

0 comments on commit 54f4ea8

Please sign in to comment.