Coder Social home page Coder Social logo

Comments (7)

wiledal avatar wiledal commented on May 28, 2024 1

Works well in my usecase!

Also, cute ✓ addition.

screenshot 2017-09-02 19 07 14

from babel-plugin-transform-builtin-classes.

WebReflection avatar WebReflection commented on May 28, 2024 1

can we close this?

from babel-plugin-transform-builtin-classes.

oravecz avatar oravecz commented on May 28, 2024

Also causes a problem when using webpack. The _fixBabelExtend() helper is only included in one of the concatenated source files. The other file, wraps the HTMLElement (in my case) with _fixBabelExtend(...) but does not include the helper function, resulting in a Uncaught ReferenceError: _fixBabelExtend is not defined

from babel-plugin-transform-builtin-classes.

WebReflection avatar WebReflection commented on May 28, 2024

so, how are you proposing to solve this?

from babel-plugin-transform-builtin-classes.

WebReflection avatar WebReflection commented on May 28, 2024

thing is, I don't know how to always force a directive, and I thought it made sense to have the fixing code in only if native extends were used.

However, I see this as an issue but I'm not too confident with Babel internals so I'm not sure how to solve that.

from babel-plugin-transform-builtin-classes.

wiledal avatar wiledal commented on May 28, 2024

I know less than you about Babel plugin development, but I found this:
https://github.com/thejameskyle/babel-handbook/blob/master/translations/en/plugin-handbook.md#-pre-and-post-in-plugins

I did some initial testing, and it looks like this issue can be solved by nullifying the name variable in the pre-method.

  return {
    pre () {
      name = null
    },
    visitor: {
      ClassDeclaration(path) {

from babel-plugin-transform-builtin-classes.

WebReflection avatar WebReflection commented on May 28, 2024

can anyone please confirm v0.4 works as expected ?

Thank you @wiledal that seems to be the right way to go.

from babel-plugin-transform-builtin-classes.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.