GithubHelp home page GithubHelp logo

Comments (6)

Klustre avatar Klustre commented on July 24, 2024 1

Yes, I'm successfully using the babel-preset-extendscript, but only with simple tests. Haven't used it in production yet. The core-js-pure library successfully transforms and ponyfills (no global scope pollution), but found esbuild uses nested ternaries which throw an error in Extendscript.

from bolt-cep.

Klustre avatar Klustre commented on July 24, 2024

I've been using babel-preset-extendscript in my setup, but it only supports most ES2015 features. core-js-pure has a ponyfill feature, but I haven't been able to have the bundler produce valid Extendscript (likely because of nested ternaries).

from bolt-cep.

justintaylor-dev avatar justintaylor-dev commented on July 24, 2024

Hey @Klustre, I did look into modern array functions to ES3 a while back but didn't find any reliable way to polyfill these on transpilation. Are you saying one those libs did support modern array functions to ES3?

from bolt-cep.

Silly-V avatar Silly-V commented on July 24, 2024

I have been just using some polyfill code and it works just fine, what you speak of is probably more advanced and proper.

from bolt-cep.

justintaylor-dev avatar justintaylor-dev commented on July 24, 2024

@Klustre Appreciate the suggestion! I've done some testing with these methods and I don't think I'll include these in the boilerplate for the time being. I have a util library for most common array methods in the utils.ts file.

If you want to add to your own clone, you can by installing and adding babel-preset-extendscript to babel presets array in vite.es.config.ts, but you'll need to adjust the tsconfig to not show errors with modern array methods.

from bolt-cep.

justintaylor-dev avatar justintaylor-dev commented on July 24, 2024

@Klustre revisited this and added a simple implementation for Ponyfills in Rollup.

Built-in Ponyfills have been implemented in 0.4.0 and you can add your own custom ones (see the Readme for details).

from bolt-cep.

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.