-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Transformed export statement from global exports are wrong, when re exported from module. #1675
Comments
Issue still in v0.51.1 |
Hi @cebor, thanks for this issue and sorry you have been waiting for some time. After the easier issues caused by the recent release are settled, I plan on digging deeper into the dependency resolution algorithm, there are more issues like this one that need to be addressed. |
Version |
Using a default export works as workaround: // main.js
export { default as Highcharts } from './index'
// index.js
import * as Highcharts from 'highcharts'
export default Highcharts; Result: import * as Highcharts from 'highcharts';
export { Highcharts }; |
This is a special case that requires the generation of a temporary variable. We can certainly add this. |
(Although this would be much easier to support with the |
I'm looking into reworking the code around this case as well as some other reexports scenarios. Should hopefully have a PR up soon. |
Should be fixed by #1947. |
Fixed in 0.55.4. |
The following example shows, when i re export a global export from a module the export statement in the result is wrong.
Highcharts is declared as external module and has no explicit named exports, so only the global export with the
*
works.Example:
https://rollupjs.org/repl?version=0.51.1&shareable=JTdCJTIybW9kdWxlcyUyMiUzQSU1QiU3QiUyMm5hbWUlMjIlM0ElMjJtYWluLmpzJTIyJTJDJTIyY29kZSUyMiUzQSUyMmV4cG9ydCUyMCU3QiUyMEhpZ2hjaGFydHMlMjAlN0QlMjBmcm9tJTIwJy4lMkZpbmRleCclMjIlN0QlMkMlN0IlMjJuYW1lJTIyJTNBJTIyaW5kZXguanMlMjIlMkMlMjJjb2RlJTIyJTNBJTIyaW1wb3J0JTIwKiUyMGFzJTIwSGlnaGNoYXJ0cyUyMGZyb20lMjAnaGlnaGNoYXJ0cyclNUNuZXhwb3J0JTIwJTdCJTIwSGlnaGNoYXJ0cyUyMCU3RCUyMiU3RCU1RCUyQyUyMm9wdGlvbnMlMjIlM0ElN0IlMjJmb3JtYXQlMjIlM0ElMjJlcyUyMiUyQyUyMmdsb2JhbHMlMjIlM0ElN0IlN0QlMkMlMjJuYW1lJTIyJTNBJTIybXlCdW5kbGUlMjIlMkMlMjJhbWQlMjIlM0ElN0IlMjJpZCUyMiUzQSUyMiUyMiU3RCU3RCUyQyUyMmV4YW1wbGUlMjIlM0FudWxsJTdE
The text was updated successfully, but these errors were encountered: