Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-export doesn't work properly with --splitting #273

Closed
egoist opened this issue Jul 19, 2020 · 0 comments
Closed

Re-export doesn't work properly with --splitting #273

egoist opened this issue Jul 19, 2020 · 0 comments

Comments

@egoist
Copy link

egoist commented Jul 19, 2020

Repro:

// a.ts
export const a = 1

// b.ts
export { a } from './a'
esbuild a.ts b.ts --outdir=dist--format=esm --bundle --splitting

Output:

a.js:

import {
  a
} from "./chunk.xL6KqlYO.js";

// a.ts
export {
  a
};

b.js:

import "./chunk.xL6KqlYO.js";
// ↑↑ ERROR: should be `import { a } from "./chunk.xL6KqlYO.js";`

// b.ts
export {
  a
};

chunk.xL6KqlYO.js:

// a.ts
const a = 1;

export {
  a
};
@evanw evanw closed this as completed in 46559d8 Jul 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant