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

Global externals can leak into es bundle when using multiple targets #875

Closed
such opened this issue Aug 24, 2016 · 2 comments
Closed

Global externals can leak into es bundle when using multiple targets #875

such opened this issue Aug 24, 2016 · 2 comments

Comments

@such
Copy link

such commented Aug 24, 2016

Hello,

I created a minimal project that reproduces the issue : https://github.com/such/test-rollup.

My project b depends on a class from project a:

import { A } from 'a';

export default function() {
  const myA = new A();
  myA.print();
  console.log('In module b');
}

The output file from building an es bundle of b together with an umd bundle is:

import { A } from 'a';

function index() {
  const myA = new a.A();
                 ^^^
  myA.print();
  console.log('In module b');
}

export default index;

even though when we only build the es bundle we get the correct output:

import { A } from 'a';

function index() {
  const myA = new A();
  myA.print();
  console.log('In module b');
}

export default index;

Let me know if you need more information.

@Rich-Harris
Copy link
Contributor

Thanks for the test repo, very helpful – have opened #885

@Rich-Harris
Copy link
Contributor

Fixed in 0.34.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants