Closed marmeblade closed 1 year ago
Thanks for the report.
Would you mind posting what's the content of fullOutput
when that happens?
No problem. Here's the output:
[info] welcome to sbt 1.8.2 (Oracle Corporation Java 20.0.1)
[info] loading global plugins from C:\Users\xxx\.sbt\1.0\plugins
[info] loading settings for project yyy-build from plugins.sbt ...
[info] loading project definition from C:\Users\xxx\IdeaProjects\yyy\project
[info] loading settings for project yyy from build.sbt ...
[info] set current project to yyy (in build file:/C:/Users/xxx/IdeaProjects/yyy/)
[info] compiling 1 Scala source to C:\Users\xxx\IdeaProjects\yyy\_shared\.jvm\target\scala-3.2.2\classes ...
[info] compiling 1 Scala source to C:\Users\xxx\IdeaProjects\yyy\_shared\.js\target\scala-3.2.2\classes ...
[info] done compiling
[info] done compiling
[info] Full optimizing C:\Users\xxx\IdeaProjects\yyy\_shared\.js\target\scala-3.2.2\shared-opt
[info] Full optimizing C:\Users\xxx\IdeaProjects\yyy\_shared\.jvm\target\scala-3.2.2\shared-opt
[info] Full optimizing C:\Users\xxx\IdeaProjects\yyy\_frontend\target\scala-3.2.2\frontend-opt
sharedJS / Compile / fullLinkJSOutput
C:\Users\xxx\IdeaProjects\yyy\_shared\.js\target\scala-3.2.2\shared-opt
sharedJVM / Compile / fullLinkJSOutput
C:\Users\xxx\IdeaProjects\yyy\_shared\.jvm\target\scala-3.2.2\shared-opt
frontend / Compile / fullLinkJSOutput
C:\Users\xxx\IdeaProjects\yyy\_frontend\target\scala-3.2.2\frontend-opt
I just replaced the user and project name. Otherwise it's the original. It seams this intendation is done by sbt. For better readability perhaps?
Ah. You need to set projectID: "frontend"
in the configuration, because you have multiple projects in your sbt build. See https://github.com/scala-js/vite-plugin-scalajs#configuration
Oh, I understand. I asked myself why he would compile everything instead of just that project. I have to say I fully misinterpreted for what that option was. Thank you very much for your help!
At least under windows I got a weird error message:
Notice there is a huge whitespace in front of the path. It turns out, for some reason, this whitespace is generated in the response here:
https://github.com/scala-js/vite-plugin-scalajs/blob/2f94cf3f2eb02d429b08cf99ec7317a91179ab0e/index.ts#L23C2-L34
I was able to fix it by adding a final trim to the output before returning:
Should I add a PR for this?