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

Fix bubleCleanup es6 class unwrapping #19982

Merged
merged 1 commit into from Aug 2, 2020
Merged

Conversation

ianpurvis
Copy link
Contributor

@ianpurvis ianpurvis commented Aug 1, 2020

I found that buble does not always place the prototype and constructor assignment at the end of the es6 class wrapper, which was breaking the transform for AudioListener (#19934 (comment))

This makes the string replacement more agnostic about where things are located. I also added some captures for some extra safety around the es6 class and parent class names.

Supports #11552

@mrdoob
Copy link
Owner

mrdoob commented Aug 2, 2020

Thanks for working on this 🙏

I've studied the problem and this is what's happening.

So far bubleCleanup was only able to handle buble's output of this:

class Dog extends Animal {

    constructor() {}

}

This PR adds support for buble's output of this:

class Dog extends Animal {

    constructor() {}

    bark() {}

    ...

}

@mrdoob mrdoob added this to the r120 milestone Aug 2, 2020
@mrdoob mrdoob merged commit ba2f9e4 into mrdoob:dev Aug 2, 2020
@mrdoob
Copy link
Owner

mrdoob commented Aug 2, 2020

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants