GithubHelp home page GithubHelp logo

Comments (8)

rahatarmanahmed avatar rahatarmanahmed commented on May 22, 2024 1

The workaround for this, as @yoshuawuyts says, is to have duplicate yoyoify and sheetify transforms before babelify. Not ideal but it seems to work.

const jsOpts = {
  js: {
    transform: [
      'envify',
      'sheetify/transform',
      'yo-yoify',
      ['babelify', { presets: ['latest'] }]
    ]
  },
  optimize: true
}
const clientPath = path.join(__dirname, '../client/app.js')
client = bankai(clientPath, jsOpts)

from bankai.

MattMcFarland avatar MattMcFarland commented on May 22, 2024

I am happy to send PR but I dont know what strategy we should take for fixing this.. thoughts are welcome :)

from bankai.

yoshuawuyts avatar yoshuawuyts commented on May 22, 2024

from bankai.

MattMcFarland avatar MattMcFarland commented on May 22, 2024

Both fail, when disabling one or the other uglifyjs does not like template tags nor does it like arrow functions.

from bankai.

MattMcFarland avatar MattMcFarland commented on May 22, 2024

I think one way to fix this would be to transpile before it is sent to uglifyjs. However, if you transpile first then call yoyoify it blows up.

The problem is that yoyoify has to be called before you transpile and you have to transpile before you run uglifyjs - I havent confirmed this but that is the only thing that makes logical sense to me atm.

from bankai.

yoshuawuyts avatar yoshuawuyts commented on May 22, 2024

from bankai.

delvedor avatar delvedor commented on May 22, 2024

Hi guys, same problem here!
Solved in this way:

"script": {
"build:browser": "bankai build browser/index.js --optimize --electron build-browser/"
}
"browserify": {
  "transform": [
    "unassertify",
    "yo-yoify",
    "es2020"
  ]
}

from bankai.

yoshuawuyts avatar yoshuawuyts commented on May 22, 2024

You can now do --uglify false and it should no longer crash, can just pull in your own uglify (: Given the lack of activity I think this issue has been resolved. Feel free to reopen if it hasn't been. Cheers!

from bankai.

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.