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
export default should use const/let, not var. #653
Comments
This should be opt-in, if such and option existed. Rollup is most commonly used as the final step in bundling JavaScript libraries, so using |
agree. I think we're at the point where we see projects that are targeting es6-compatible targets and rollup is used as a module bundler. I'd like to see this feature mostly for those scenarios so that using rollup doesn't mean regressing to es2015. |
Agree. Now I'm using: const myModule = {
foo: 'bar'
}
export default myModule |
Have raised #684 |
options.preferConst to use const instead of var when creating statements
As of 0.26.6, you can use |
that works great! Thank you :) |
Currently, when exporting a default object, it assigns it using
var
which is unnecessary.Example:
rollup ./test.js
Instead, it should use
const
.The text was updated successfully, but these errors were encountered: