portable-scala/sbt-crossproject

Plugins can only be enabled for all of the projects

eatkins opened this issue · 2 comments

There are a number of plugins that only make sense on a particular platform (e.g. ScalaJSBundlerPlugin). Enabling them on a cross project, makes them active on all projects. This can completely break the incompatible projects. As a workaround, I've had to make separate projects and symlink shared source code in managedSources.

sjrd commented

The standard way to do anything specifically on one platform (besides settings) is to use .xyzConfigure. For example,

lazy foo = crossProject
  .jsConfigure(_.enablePlugins(ScalaJSBundlerPlugin))
  .settings(
    ...
  )

Aah, ok. It would be great to add this to the README.md.