Search code examples
ruby-on-rails-6elm

How do I add elm 0.19.1 to a Rails 6 application (with webpacker)?


I found a very good tutorial on how to do this in a Rails 5.1 app (https://thoughtbot.com/blog/elm-and-rails-sitting-in-a-tree), but with the new folder structure in Rails 6 I'm confused. Where do I put the Elm Main.elm-file? How do I setup webpack(er) to correctly integrate the elm-code into my packs/js-bundle?


Solution

  • bundle exec rails webpacker:install:elm
    works even if the documentation for webpacker v6.x.x no longer provides information on the integration of elm.