Ok, so what I wanted to say is that compressed js was created for every 
.elm file that was in the packs directory so in the end I had like 20 
generated js files with sizes up to 2MB, imagine that it took like 100 
seconds for that. :) 

But, after posting the same issue in the rails webpacker github, I got the 
answer and solution. Apparently the elm files shouldn't be in packs 
directory, because webpacker checks everything there and tries to compile 
it. What I did was isolate my app outside of packs dir and reference it 
from application.js file.

On Friday, June 23, 2017 at 11:53:02 AM UTC+2, Noah Hall wrote:
>
> Can you expand a bit what you mean by "all elm files are compiled"? 
> Every file needs to be compiled in order for Elm to generate the right 
> javascript. 
>
> On 22 June 2017 at 13:06, Peco Danajlovski <[email protected] 
> <javascript:>> wrote: 
> > Hi, 
> > 
> > I am a RoR developer who recently started to learn Elm. I have a small 
> > application that I integrated with Rails 5.1 through Webpacker plugin. 
> > However when running webpack I noticed that all elm files are compiled 
> > instead of just Main, and that makes things really, really slow. So my 
> > question, is it possible to configure webpack just to use the main elm 
> file 
> > and if yes how to do that? 
> > 
> > Cheers, 
> > Peco 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "Elm Discuss" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to [email protected] <javascript:>. 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to