Question: Hi all, I'm getting Elm set up with webpack for the first time, and saw that Webpack 4 was just released, but unfortunately the elm-webpack-loader appears to be broken with Webpack 4. Does anyone have any experience with how long something like that might take to get updated? I'm fine going to webpack 3 for now, just wondering around when I should check back again for webpack 4 support, I suppose Also, is webpack what most people use to build their elm apps around here, or do people stick to calling elm-make directly?

Asked By
Asked At
2018-02-28 16:54:29

Found 15 possible answers.

User Answered At Possible Answer
mdevlamynck 2018-02-28 16:57:30 Hi I'm working in a company wanting to change the frontend framework and considering using elm. One concern is that we would like to have the same framework for both web dev and hybrid mobile app. What's elm story on mobile apps?
pdamoc 2018-02-28 16:59:02 @mdevlamynck Elm does not have an official mobile story beyond what you can obtain with html. There are experiment with rendering to React Native and there are brave souls who used that but it is still experimental.
mdevlamynck 2018-02-28 17:06:34 @pdamoc Thank you, that's what I suspected. Do you know if there are known issues with the use of elm with cordova?
pdamoc 2018-02-28 17:07:38 @ilias has more info on this:
mdevlamynck 2018-02-28 17:09:57 thanks
mark.karavan 2018-02-28 17:23:05 Is there a good way to dynamically select functions responsively? Example:
htmlMsgDestop : Html Msg
I'm sure you can select this with a variable coming from a port, but I want to know if there is a more sophisticated way to do it. -- runs this function if running on a mobile device htmlMsgMobile : Html Msg -- runs this function if running on a desktop browser
pdamoc 2018-02-28 17:33:18 @mark.karavan you need a way to figure out on what device you are. If you have this information in the model, switching renderers is trivial.
mark.karavan 2018-02-28 17:34:50 @pdamoc I figure I can send the browser information into elm via a port manually. Is that the only solution you know of?
dan878 2018-02-28 17:35:11 @mark.karavan could you do it with a css class and media queries?
mark.karavan 2018-02-28 17:35:44 @dan878 That's what I would like to do :slightly_smiling_face:
pdamoc 2018-02-28 17:35:58 @mark.karavan you can request the size of the device and save it in the model. but…. @dan878 is right, if you can solve it in CSS, that might be better. you don’t need to use port for this unless you want detailed information.
dan878 2018-02-28 17:37:08 CSS would be faster than figuring this out and storing it. You could just do [ div [ class "hidden-xs" ] [ text "Desktop" ], div [ class "visible-xs" ] [ text "Mobile" ] ] That would work on Bootstrap, and you could fairly easily implement the CSS classes without Bootstrap.
mark.karavan 2018-02-28 17:38:12 Love it. Thank you @dan878 !
dan878 2018-02-28 17:38:22 no problem :slightly_smiling_face:
ericgj 2018-02-28 17:40:02 you can also pass device info in through a flag (once), rather than out and in a port

Related Questions