cincheo / jsweet

A Java to JavaScript transpiler.
http://www.jsweet.org
Other
1.45k stars 159 forks source link

Problems with imports when in commonjs and j4ts #737

Closed Krzysztof-Dziardziel closed 1 year ago

Krzysztof-Dziardziel commented 1 year ago

Hey!

Whenever I set those pluginOptions:

<targetVersion>ES6</targetVersion>
<module>commonjs</module>
<moduleResolution>classic</moduleResolution>

I keep getting errors, even though I have j4ts as a candy.

Cannot find name 'IValueMap'.
Cannot find name 'HashMap'.
Cannot find name 'ArrayList'.
Cannot find name 'JSONArray'.

What should I do to get commonjs modules, while using j4ts? When I commented out those 3 plugin options - everything seems to be working fine.