This is a copy of https://youtrack.jetbrains.com/issue/SCL-24518/Scala-js-libs-not-recognized-with-sbt-web-bundler-plugin – I do think the fault is with IJ and not this plugin, but in order to raise awareness and in case I'm mistaken, I'll put it here as well.
Steps to reproduce
-
Clone https://github.com/randm-ch/scalajs-cross-compile-example
-
Import sbt project
-
Successfully compile everything
-
Open bar/js/src/main/scala/example/Main.scala
-
See that Scala-js import don't work
Expected result:
Working imports for scala-js libraries
Actual result:
None of the import for scala-js libraries (every library that is fetched with %%% in the sbt dependencies) are recognized by IDEA, but they are present in the "External Libraries" list:
Additional information
IDE and Scala Plugin versions: IntelliJ IDEA 2025.2.3 (Ultimate Edition), Scala Plugin 2025.2.676
Scala and Java versions: sbt 1.11.7, Scala 2.13.16, Java 24.0.2
The issue only happens with the sbt-web-scalajs-bundler plugin enabled, without it everything works as expected. However, I don't think the problem is with that plugin, as I have not updated it when this problem appeared (a couple of weeks, maybe a month ago).
This is a copy of https://youtrack.jetbrains.com/issue/SCL-24518/Scala-js-libs-not-recognized-with-sbt-web-bundler-plugin – I do think the fault is with IJ and not this plugin, but in order to raise awareness and in case I'm mistaken, I'll put it here as well.
Steps to reproduce
Clone https://github.com/randm-ch/scalajs-cross-compile-example
Import sbt project
Successfully compile everything
Open
bar/js/src/main/scala/example/Main.scalaSee that Scala-js import don't work
Expected result:
Working imports for scala-js libraries
Actual result:
None of the import for scala-js libraries (every library that is fetched with
%%%in the sbt dependencies) are recognized by IDEA, but they are present in the "External Libraries" list:Additional information
IDE and Scala Plugin versions: IntelliJ IDEA 2025.2.3 (Ultimate Edition), Scala Plugin 2025.2.676
Scala and Java versions: sbt 1.11.7, Scala 2.13.16, Java 24.0.2
The issue only happens with the
sbt-web-scalajs-bundlerplugin enabled, without it everything works as expected. However, I don't think the problem is with that plugin, as I have not updated it when this problem appeared (a couple of weeks, maybe a month ago).