We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This issue appeared in 0.25.5.
main.js:
import * as moduleContents from './global-exporter'; moduleContents.exportedGlobal.someMethod();
global-exporter.js:
export var exportedGlobal = someGlobal;
result:
'use strict'; var exportedGlobal = someGlobal; exportedGlobal();
the .someMethod gets eaten, and the resulting code tries to call the export directly as a function.
.someMethod
Playground link:
http://rollupjs.org/#{%22options%22%3A{%22format%22%3A%22cjs%22%2C%22moduleName%22%3A%22myBundle%22%2C%22globals%22%3A{}}%2C%22modules%22%3A[{%22name%22%3A%22main.js%22%2C%22code%22%3A%22import%20*%20as%20moduleContents%20from%20%27.%2Fglobal-exporter%27%3B\nmoduleContents.exportedGlobal.someMethod%28%29%3B%22}%2C{%22name%22%3A%22global-exporter.js%22%2C%22code%22%3A%22export%20var%20exportedGlobal%20%3D%20someGlobal%3B%22}]}
The text was updated successfully, but these errors were encountered:
Actually, fiddling a bit more, it doesn't seem to be specific to exporting a global:
http://rollupjs.org/#{%22options%22%3A{%22format%22%3A%22cjs%22%2C%22moduleName%22%3A%22myBundle%22%2C%22globals%22%3A{}}%2C%22modules%22%3A[{%22name%22%3A%22main.js%22%2C%22code%22%3A%22import%20*%20as%20moduleContents%20from%20%27.%2Fmodule%27%3B\nmoduleContents.exportedObject.someMethod%28%29%3B%22}%2C{%22name%22%3A%22module.js%22%2C%22code%22%3A%22export%20var%20exportedObject%20%3D%20{%20someMethod%3A%20function%20%28%29%20{%20}%20}%3B%22}]}
Accessing the property for the method call still is lost.
Sorry, something went wrong.
@Conduitry This is most certainly due to a regression in #566. A fix for it is inbound as of #569.
Looks like this is fixed and released! Closing
No branches or pull requests
This issue appeared in 0.25.5.
main.js:
global-exporter.js:
result:
the
.someMethod
gets eaten, and the resulting code tries to call the export directly as a function.Playground link:
http://rollupjs.org/#{%22options%22%3A{%22format%22%3A%22cjs%22%2C%22moduleName%22%3A%22myBundle%22%2C%22globals%22%3A{}}%2C%22modules%22%3A[{%22name%22%3A%22main.js%22%2C%22code%22%3A%22import%20*%20as%20moduleContents%20from%20%27.%2Fglobal-exporter%27%3B\nmoduleContents.exportedGlobal.someMethod%28%29%3B%22}%2C{%22name%22%3A%22global-exporter.js%22%2C%22code%22%3A%22export%20var%20exportedGlobal%20%3D%20someGlobal%3B%22}]}
The text was updated successfully, but these errors were encountered: