Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hmsk/elm-vite-plugin-helper

An Elm package to provide helpers for using vite-plugin-elm
https://github.com/hmsk/elm-vite-plugin-helper

elm vite

Last synced: 5 days ago
JSON representation

An Elm package to provide helpers for using vite-plugin-elm

Awesome Lists containing this project

README

        

# elm-vite-plugin-helper

An Elm package to provide helpers for using [vite-plugin-elm](https://github.com/hmsk/vite-plugin-elm).

## Install

```
elm install hmsk/elm-vite-plugin-helper
```

## Usage

```elm
import Html exposing (Html, img)
import Html.Attributes exposing (src)
import VitePluginHelper exposing(asset)

view : Model -> Html Msg
view _ =
[
img [ src <| asset "/assets/logo.png" ] []
-- An exact URL or inline data for an asset should be provided by Vite
]
```