Giter Site home page Giter Site logo

Comments (3)

pmlopes avatar pmlopes commented on May 18, 2024 1

@rquast this project doesn't do any special transpilation, you can see what ES6 level is supported by your runtime in the kangax table:

The only "trick" this project does is what you've just spotted, allow ES6 import syntax to be converted to commonjs require statements, mostly because IDEs such as vscode when using this format will pull the right type definition files giving you type hinting and proper code completion.

If you need more advanced features then you should rely on a ES6 transpiler such as babel, buble, traceur, etc... but this is not included in this project.

The reason is that the same runtime will run on GraalVM which is already ES6 ready (GraalVM support is still very experimental and has not been production tested, so currently it is just a development feature).

from es4x.

rquast avatar rquast commented on May 18, 2024

Oh I think you might be just transpiling "import" only in your own code.

private static String adaptImport(final String exports, final String module) {

I thought it was running through typescript or something. Makes sense now.

So it's up to me to implement my own typescript transpilation then I guess? :)

from es4x.

rquast avatar rquast commented on May 18, 2024

Awesome! Thanks for the quick and detailed response Paulo!

from es4x.

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.