Skip to content

Scala-js libs not recognized in IntelliJ IDEA with this plugin #505

Description

@randm-ch

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

  1. Clone https://github.com/randm-ch/scalajs-cross-compile-example

  2. Import sbt project

  3. Successfully compile everything

  4. Open bar/js/src/main/scala/example/Main.scala

  5. 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:

Image

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions