reactiverse / es4x

🚀 fast JavaScript 4 Eclipse Vert.x
https://reactiverse.io/es4x/
Apache License 2.0
878 stars 75 forks source link

GraalVM intl-402 support #552

Closed vh1572 closed 3 years ago

vh1572 commented 3 years ago

Hi,

I'm using es4x for a project which requires the GraalVM intl-402 support to be enabled.

There is no way to configure it easily. The only way I managed to configure it was setting the environment variable before starting the application: export JAVA_TOOL_OPTIONS=-Dpolyglot.js.intl-402=true

Would it be possible to include it by default in the es4x-cli.js or to make it configurable by some command line argument?

Thanks

pmlopes commented 3 years ago

@vh1572 did you try:

If you're using npm:

npm start -- -Dpolyglot.js.intl-402=true

Or using the generated launchers:

./node_modules/.bin/es4x -Dpolyglot.js.intl-402=true main.js
pmlopes commented 3 years ago

I did a small test and can assert that this works:

print(process.properties['polyglot.js.intl-402'])

print(Intl.NumberFormat)
vh1572 commented 3 years ago

Hi, yes, I can also confirm that the version es4x -Dpolyglot.js.intl-402=true works.

Thank you.