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
Given this code with decorators:
@Injectable() class Testability() {}
Typescript transpiles this into a more verbose version of this es6 code:
export let Testability = class Testability {}; Testability = __decorate([ Injectable(), ], Testability); function __decorate(decorators, target) { return target; } function Injectable() {}
If code like this is processed by rollup, rollup will emit invalid code that looks like:
(function (exports) { 'use strict'; exports.Testability = class exports.Testability {}; exports.Testability = __decorate([ Injectable(), ], exports.Testability); function __decorate(decorators, target) { return target; } function Injectable() {} }((this.rollbug = this.rollbug || {}))); //# sourceMappingURL=rollbug.umd.js.map
Note the class exports.Testability part which is syntactically invalid es6 code.
class exports.Testability
I'd expect the class to be emitted as exports.Testability = class Testability{ ...
exports.Testability = class Testability{ ...
rollup config:
export default { entry: 'rollbug.js', dest: 'rollbug.umd.js', sourceMap: true, format: 'iife', moduleName: 'rollbug' }
rollup version: 0.26.0
The text was updated successfully, but these errors were encountered:
Simpler repro:
export let Foo = class Foo {} Foo = lol( Foo );
Results in:
'use strict'; exports.Foo = class exports.Foo {} exports.Foo = lol( exports.Foo );
Sorry, something went wrong.
create new scope for classes, with class expression ID (if any) as so…
d3f092a
…le name. fixes #626
Thanks @IgorMinar – have opened #628 to address this
Merge pull request #628 from rollup/gh-626
797a201
create new scope for classes, with class expression ID (if any) as sole name
No branches or pull requests
Given this code with decorators:
Typescript transpiles this into a more verbose version of this es6 code:
If code like this is processed by rollup, rollup will emit invalid code that looks like:
Note the
class exports.Testability
part which is syntactically invalid es6 code.I'd expect the class to be emitted as
exports.Testability = class Testability{ ...
rollup config:
rollup version: 0.26.0
The text was updated successfully, but these errors were encountered: