Giter Site home page Giter Site logo

Comments (7)

huozhi avatar huozhi commented on May 18, 2024 1

I'm waiting for a change on swc side so that I could adopt swc, then the target will easier to control

from bunchee.

huozhi avatar huozhi commented on May 18, 2024

@shuding This was intended to make sure all the output are compatible with es5, mostly for browser compatibility. Override it inside the bundler to let user configure less.
Very good callout, I was also wondering should we use mordern syntaxes for node.js project. What's your case here that you'd like to use other target besides ES5?

from bunchee.

shuding avatar shuding commented on May 18, 2024

I think ES5 can be a good default, but shouldn't override user's intention in tsconfig. For example I want to try ESNext to drop IE support.

from bunchee.

huozhi avatar huozhi commented on May 18, 2024

TIL from styfle that we can use node version to specific ecmascript version with babel

node10 => es2018
node12 => es2019
node14 => es2020

I'll think of that later, maybe to provide a CLI option instead consuming from tsconfig to make the behavior consistent between js and ts inputs

from bunchee.

shuding avatar shuding commented on May 18, 2024

Wow that’s interesting… but eventually I believe Bunchee needs its own config file. 😄

from bunchee.

huozhi avatar huozhi commented on May 18, 2024

Short term, consider esbuild as an alternative for testing?

Since IE is deprecated in 2022 soon, we might want to support es6 output

from bunchee.

koba04 avatar koba04 commented on May 18, 2024

IE is now officially out of support, so it's time to change the target version.
vercel/swr#2095

from bunchee.

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.