GithubHelp home page GithubHelp logo

Comments (5)

marijnh avatar marijnh commented on July 26, 2024 1

Ah, I wasn't even talking about this causing a problem in the Bublé sources (I hadn't noticed)—rather it was causing trouble in my own projects. But I've fallen back on directly writing the horrible ES5 code needed to create a subclass of Error for now, and I guess I'll just keep doing that until the next geological era when I can ship client-side ES6 code. So this isn't blocking me.

from buble.

marijnh avatar marijnh commented on July 26, 2024

Oh, even with that fix, the resulting instances are not instanceof your class. Even Babel doesn't get that right.

It does work when you directly use class syntax in the browser, so this is a case where compiling down does some damage.

from buble.

Rich-Harris avatar Rich-Harris commented on July 26, 2024

Two possible fixes — don't transpile classes (#43), or don't transpile anything (#42). Depends whether we want to continue supporting Node 4. Any thoughts?

from buble.

adrianheine avatar adrianheine commented on July 26, 2024

As discussed in the babel issue, whether extending builtins is allowed should probably be configurable, right?

from buble.

adrianheine avatar adrianheine commented on July 26, 2024

As @Andarist pointed out in #93, CompileError already sets message and stack, so this should not be a problem for bublé itself.

from buble.

Related Issues (20)

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.