4

I'm using the Elm integration plugin for Scala/Play projects, known as sbt-elm, in conjunction with Play Framework.

I notice that, in addition to the elmMain.js file produced by the elm-make command, all of the .elm source files end up in the target/web/public/main/elm directory. I'm not sure if that's expected behaviour; maybe it's normal operation of the SbtWeb pipeline; but it does mean that the eventual binary distribution contains Elm source code that isn't actually needed at runtime.

To optimize the deployment of my application, I'd like to exclude the Elm source files from the distribution artifacts.

Should I look for a way to prevent the .elm files being copied to the target/web/public/main directory; or look for a way to prevent the .elm files from being packaged into the distribution artifacts? How might I do that?

Many thanks for your attention, and for any guidance that you might be able to offer.

David
  • 5,074
  • 3
  • 37
  • 64
  • i'm not familiar with SBT pipeline - but can't you find some ideas by looking at `elm-webpack-loader` ?! [here](https://github.com/elm-community/elm-webpack-loader) - with webpack i only get the transpiled js in my `dist` - build directory. – AIon May 23 '17 at 16:47

1 Answers1

1

I'm the maintainer of sbt-elm, thank you for raising this question and unfortunately I have no immediate solution for this. Therefore, I opened an issue on Github that you can view here: https://github.com/choucrifahed/sbt-elm/issues/13

Cheers, Choucri

Choucri
  • 240
  • 1
  • 6