Question: would anyone here want to share their webpack config or similar for elm code?

Asked By
drathier
Asked At
2018-05-01 16:19:56

Found 15 possible answers.

User Answered At Possible Answer
luke 2018-05-01 16:26:59 here's the webpack config for ellie https://github.com/lukewestby/ellie/blob/0.19/assets/webpack.dev.config.js one thing about the dev server config: the host is '0.0.0.0' because it runs inside a docker container and is referenced by a different network name than localhost replace .dev with .prod for production build
drathier 2018-05-01 16:30:44 thanks :slightly_smiling_face:
norpan 2018-05-01 16:53:51 we just use create-elm-app, you can try elm-app eject to get the config
tony_bradley 2018-05-01 17:37:40 In my package.json I generally just have something like
  }
    "test": "echo \"Real devs test in prod\" && exit 1"
    "build:client": "elm-make client/Main.elm --output=static/elm.js && uglifyjs ./static/elm.js -o ./static/elm.js",
    "dev:client": "elm-live client/Main.elm --dir=./static --pushstate --debug --output=static/elm.js",
"scripts": {
rupertlssmith 2018-05-01 19:10:38 Is it just me or is package.elm-lang.org not working? I'm getting stuck on "Loading..."
joelq 2018-05-01 19:11:54 Works for me in an incognito window
rupertlssmith 2018-05-01 19:12:11 No worries, got past that now. I think my internets is playing up.
nqthqn 2018-05-01 20:01:13 Any case studies for using ports for optimization?
whmountains 2018-05-01 20:01:27 Ports for optimization?
cmarfia 2018-05-01 20:14:13 You have peeked my interest... do tell
nqthqn 2018-05-01 22:47:52 This just made me so happy :slightly_smiling_face: https://ellie-app.com/mSMn97W62a1/0
timbuckley 2018-05-01 23:44:38 @nqthqn This part?
type Name = Checkmark | Close
-- "Checkmark" toString Name
nqthqn 2018-05-01 23:44:48 yep :slightly_smiling_face: My friend showed me how in typescript you can use a few possible strings as a function parameter and if you call the function with a different string it won't compile. I wanted to try something similar in Elm.
timbuckley 2018-05-01 23:45:23 Same. Now if we can somehow get all the enumerables from Name :thinking_face:
nqthqn 2018-05-01 23:46:19 I just think doing icon Checkmark is better than icon "checkmark" - since the former is checked by the compiler and the later will just show no icon on the screen at runtime (ugh)
"Bar 4" : String
> toString (Bar 4) I feel like this is the closest I have gotten to code introspection in Elm. hmmm... Interesting....
"Bar \"abc\"" : String
> toString (Bar "abc") type Foo a = Bar a

Related Questions