1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-09-10 06:15:59 +00:00

Update TeaVM for ESM support

We still need our fork (file attributes, some Math/Int/Long methods),
but this simplifies things a wee bit.
This commit is contained in:
Jonathan Coates
2024-03-13 13:01:25 +00:00
parent 7ee821e9c9
commit 6fb291112d
2 changed files with 3 additions and 1 deletions

View File

@@ -4,6 +4,7 @@
package cc.tweaked.web.builder;
import org.teavm.backend.javascript.JSModuleType;
import org.teavm.common.JsonUtil;
import org.teavm.tooling.ConsoleTeaVMToolLog;
import org.teavm.tooling.TeaVMProblemRenderer;
@@ -71,6 +72,7 @@ public class Builder {
// Then finally start the compiler!
var tool = new TeaVMTool();
tool.setTargetType(TeaVMTargetType.JAVASCRIPT);
tool.setJsModuleType(JSModuleType.ES2015);
tool.setTargetDirectory(output.toFile());
tool.setClassLoader(remapper);
tool.setMainClass("cc.tweaked.web.Main");