Coder Social home page Coder Social logo

Comments (9)

Havunen avatar Havunen commented on August 26, 2024 1

I will make a inferno starter project based on rollup and stuff we use in our company... but there is so much to do atm. So that has lower priority

from create-inferno-app.

Havunen avatar Havunen commented on August 26, 2024

If you want optimal output, you might want to consider rollup IIFE format + custom set of plugins (no preset) for babel. This way you get only once per application those helpers inlined. Also "typeof" babel plugin creates a lot of overhead. We simply removed it, but then you cannot use typeof for Symbols. I'm not sure if we can apply those patterns into this create-inferno-app, but you can definitely roll your own.

from create-inferno-app.

sprlwrksAprilmintacpineda avatar sprlwrksAprilmintacpineda commented on August 26, 2024

hmmm, if I use rollup and custom babel config, that would mean I would need to eject, right?

from create-inferno-app.

Havunen avatar Havunen commented on August 26, 2024

@sprlwrksAprilmintacpineda yeah, it might be easier to just do everything yourself.. :/

from create-inferno-app.

aprilmintacpineda avatar aprilmintacpineda commented on August 26, 2024

@Havunen maybe we could just do that with inferno-scripts?

from create-inferno-app.

Havunen avatar Havunen commented on August 26, 2024

This project is equivalent for create-react-app and that would introduce rollup and its plugins as dependencies, I think its also easier to make new project.

from create-inferno-app.

sprlwrksAprilmintacpineda avatar sprlwrksAprilmintacpineda commented on August 26, 2024

If we aren't already, I think we can make use of the following babel plugins.:

The issue now is how to tell babel not to rewrite the helper functions and simply write them on the polyfill. Because it doesn't make sense that this:

var s = Object.assign || function (e) {
      for (var t = 1; t < arguments.length; t++) {
        var n = arguments[t];
        for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
      }
      return e
    },

is everywhere when I'm using the polyfill and it could have been added there like so:

if (Object.assign === undefined) {
  Object.prototype.assign = function (e) {
    for (var t = 1; t < arguments.length; t++) {
      var n = arguments[t];
      for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r])
    }
    return e;
  };
}

Then simply transform all the rest operators to Object.assign which have been polyfilled.

from create-inferno-app.

sprlwrksAprilmintacpineda avatar sprlwrksAprilmintacpineda commented on August 26, 2024

@Havunen how do you check if the app is working while developing it? I have a fork, I want to make changes and observe their effect, but I can't.

from create-inferno-app.

Havunen avatar Havunen commented on August 26, 2024

I have rebased all updates from the upstream, updated all the depencies to latest versions and converted the source code to ESM.
The next major version will require Node 20 or newer.

This issue is most likely fixed after all those changes to babel plugins. Closing.

from create-inferno-app.

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.