Giter Club home page Giter Club logo

Comments (5)

babel-bot avatar babel-bot commented on July 26, 2024

Hey @qtiki! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite.

from minify.

qtiki avatar qtiki commented on July 26, 2024

It seems that @babel/traverse v7.17.10 has only this one commit which is probably the cause for this - or then the minify plugin needs to be updated somehow to accommodate for these changes (I'm not a Babel developer so I have no clue). FYI @JLHwung

from minify.

JLHwung avatar JLHwung commented on July 26, 2024

Thanks for the report. This issue should be fixed in the minify plugin.

if (!scope.isPure(replacement, true) && !isReferencedBefore) {
continue;
}

Before v7.17.10 Babel does not report this as a pure expression, so dce will not try to remove _this = this. However, after 7.17.0 we should check whether the original non-arrow scope is same with the replacement non-arrow scope. If they are same, we can safely replace _this by this, otherwise we should bail.

from minify.

ehoogeveen-medweb avatar ehoogeveen-medweb commented on July 26, 2024

Note that deadcode also suffers from #981, so I'd recommend simply disabling it (along with simplify for #999 and builtIns for #904 if you run into it).

Unfortunately this project appears to be unmaintained (the last commit was in August of 2020), so looking into other minifiers might also not be a bad idea.

from minify.

qtiki avatar qtiki commented on July 26, 2024

Unfortunately this project appears to be unmaintained (the last commit was in August of 2020), so looking into other minifiers might also not be a bad idea.

This is quite bad. We have a build pipeline that relies on minify-replace and minify-dead-code-elimination working in tandem to have different compile targets. It's quite critical to us so just disabling deadcode elimination is not an option. I'll look into other options but basically this means that we'll need to stick to an older Babel version until we can work out a replacement.

from minify.

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.