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

import { undefined as someName } written when there are two entry points with a common dependency and one entry point importing the other #2877

Closed
emmatown opened this issue May 28, 2019 · 1 comment · Fixed by #2885

Comments

@emmatown
Copy link

  • Rollup Version: 1.12.4
  • Operating System (or Browser): macOS 10.14.4
  • Node Version: 10.15.3

How Do We Reproduce?

https://rollupjs.org/repl?version=1.12.4&shareable=JTdCJTIybW9kdWxlcyUyMiUzQSU1QiU3QiUyMm5hbWUlMjIlM0ElMjJtYWluLmpzJTIyJTJDJTIyY29kZSUyMiUzQSUyMmV4cG9ydCUyMCU3QiUyMGElMjAlN0QlMjBmcm9tJTIwJTVDJTIyLiUyRmNvbW1vbi5qcyU1QyUyMiUzQiU1Q25leHBvcnQlMjAlN0IlMjBjJTIwJTdEJTIwZnJvbSUyMCU1QyUyMi4lMkZvdGhlckVudHJ5LmpzJTVDJTIyJTNCJTVDbiUyMiUyQyUyMmlzRW50cnklMjIlM0F0cnVlJTdEJTJDJTdCJTIybmFtZSUyMiUzQSUyMm90aGVyRW50cnkuanMlMjIlMkMlMjJjb2RlJTIyJTNBJTIyZXhwb3J0JTIwJTdCYiU3RCUyMGZyb20lMjAlNUMlMjIuJTJGY29tbW9uLmpzJTVDJTIyJTVDbmV4cG9ydCUyMGxldCUyMGMlMjAlM0QlMjAlN0IlN0QlMjIlMkMlMjJpc0VudHJ5JTIyJTNBdHJ1ZSU3RCUyQyU3QiUyMm5hbWUlMjIlM0ElMjJjb21tb24uanMlMjIlMkMlMjJjb2RlJTIyJTNBJTIyZXhwb3J0JTIwbGV0JTIwYSUyMCUzRCUyMCU3QiU3RCUzQiU1Q24lNUNuZXhwb3J0JTIwbGV0JTIwYiUyMCUzRCUyMCU3QiU3RCUzQiU1Q24lMjIlMkMlMjJpc0VudHJ5JTIyJTNBZmFsc2UlN0QlNUQlMkMlMjJvcHRpb25zJTIyJTNBJTdCJTIyZm9ybWF0JTIyJTNBJTIyZXNtJTIyJTJDJTIybmFtZSUyMiUzQSUyMm15QnVuZGxlJTIyJTJDJTIyYW1kJTIyJTNBJTdCJTIyaWQlMjIlM0ElMjIlMjIlN0QlMkMlMjJnbG9iYWxzJTIyJTNBJTdCJTdEJTdEJTJDJTIyZXhhbXBsZSUyMiUzQW51bGwlN0Q=

Expected Behavior

A separate chunk is generated for the common dependency and that is imported by both entry points and there are no imports like import { undefined as ... }

Actual Behavior

There are no extra chunks apart from the entry points and one of the imports looks like import { undefined as ... } and what it is trying to import is not exported by any chunk.

@lukastaegert
Copy link
Member

Thanks for this issue! In the end, it lead to a larger refactoring to make the process that links chunks clearer and more straightforward. Fix at #2885.

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