Comments (3)
@rquast this project doesn't do any special transpilation, you can see what ES6 level is supported by your runtime in the kangax table:
- Running on JDK 1.8 https://kangax.github.io/compat-table/es6/#nashorn1_8
- Running on JDK >=9 https://kangax.github.io/compat-table/es6/#nashorn10
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.
Oh I think you might be just transpiling "import" only in your own code.
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.
Awesome! Thanks for the quick and detailed response Paulo!
from es4x.
Related Issues (20)
- Type coercion problem in global setTimer HOT 1
- Include js verticles in Java code HOT 5
- Multiple verticle instances generate bad context exceptions from graalvm when loading modules from common npm packages HOT 1
- Require statements fail to resolve json files from dependency except by relative path
- Limitations of es4x? HOT 6
- Problem using await HOT 3
- invokeMember (then) on io.vertx.core.impl.future.PromiseImpl@47ddaaf5 failed due to: Arity error - expected: 2 actual: 1 HOT 1
- Promise of vertx cannot call then twice or more. HOT 4
- Cannot Resolve the CWD error when path contains spaces in windows HOT 1
- Native libraries HOT 3
- About the difference between JSVerticleFactory and MJSVerticleFactory
- Make a new release with the latest graal and vert.x HOT 1
- How to use handlebars in es4x? HOT 2
- require/load - Error loading JavaScript Module with ES4X in maven project HOT 3
- PR: Tracking progress for later alignment with web-modules. HOT 2
- [Question] How to build a file for java graaljs? HOT 1
- mongo-client:Multi threaded access requested by thread Thread[] but is not allowed for language(s) js HOT 2
- Release Vertx 4.4.0 npm modules HOT 3
- GraalVM 21 not recognized HOT 4
- About Native Images for ES4X
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from es4x.