Loading css stylesheet on netlify

Dear all, as a total noob to elm I am aware this may be silly but: I am trying to deploy to netlify a very simple calculator app. I have an external stylesheet in the root folder.
Googling around I found that I should add a netlify.toml with

[build]
  publish = "dist/"
  command = "yarn elm make src/Calculator.elm --output=dist/index.html"

[build.environment]
  ELM_HOME = "$NETLIFY_BUILD_BASE/cache/elm"

Everything seems to work fine except I keep getting a 404 on the styles.css, which I am trying to add doing:

view model =
    div [class "body"]
        [ Html.node "link"
            [ Html.Attributes.rel "stylesheet"
            , Html.Attributes.href "../styles.css"
            ]
            []
...

Can someone suggest what I am doing wrong?

My guess is that Netlify doesn’t let you access anything above the dist directory (or whichever directory you define as your root). You may need to put your CSS into your dist directory and change the path to it in your view code.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.