Closed ujh closed 7 years ago
This seems to be the relevant guide: https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md
This would probably mean that the files need to live in app/assets/javascripts
and each *.elm
file would be compiled on its own. I have no idea if that is desirable or not and if that will lead to problems or not . Or maybe lead to bloat as it would include the same code more than once.
There are actually 2 PRs open that address this issue, but I haven't had time to look at them:
https://github.com/fbonetti/elm-rails/pull/7 https://github.com/fbonetti/elm-rails/pull/4
I see. Great! Is there any way I that I can help you there? I could of course try both of them and see if they work for me.
I just tested both PRs. One worked and the other unfortunately gave me an error.
Resolved in #12
First of all, it's awesome that you've written all this 👍 Unfortunately having to disable asset caching (?) in the development environment makes this almost unusable as I'm working on an app that has a lot of assets and recompiling them on every request takes upwards of 10 seconds.
Do you think that it's maybe possible to change the underlying implementation to not require me to do this? I've had a quick look at the sass-rails code and it does it differently by registering the file extensions and how to transform them. I don't know enough about Elm yet to know if that would be a feasible approach as well or not.
I'd be willing to help with this of course!