-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scala.js - package command - support for multi modules #530
Comments
I started opening a new issue, but I think it's a duplicate of this one. Besides the issue with main class missing, it's also important to be able to support multi-file output which occurs when using modules. For example:
//> using scala "3.1.1"
//> using platform "scala-js"
//> using jsVersion "1.9.0"
//> using jsModuleKind "es"
//> using jsModuleSplitStyleStr "smallestmodules"
case class Foo(bar: String)
@main def main = println(Foo("baz")) Run output 'use strict';
import * as $j_java$002elang$002eObject from "./java.lang.Object.js";
import * as $j_main$002e from "./main..js";
$j_main$002e.$s_Lmain__main__AT__V(new ($j_java$002elang$002eObject.$d_T.getArrayOf().constr)([])); Notice that Multi-module support is important for integrating with modern JS tooling such as snowpack which enables a fast-reload development cycle. Thanks again for all your work on improving support for Scala.js. I think solving this one will nail it. |
Hi @armanbilge, thanks again for reporting. It seems, that I see, that Scala.js Linker generates a lot files js files, should they all be copied to the
I think we can do it this way. Scala-cli will require the |
Yes, that's right. But I see you've already fixed this in #816, amazing! |
It would be nice to support js modules in
package
commandfor now,
package ... --js
throws error, that main class is missing.The text was updated successfully, but these errors were encountered: