Note: This page covers Parcel 1, the documentation for Parcel 2 is being worked on here: v2.parceljs.org

Elm

Supported extensions: elm

Elm is a functional language with an advanced type system that ensures correctness of your code and prevents confusing runtime errors. With its focus on simplicity and speed, Elm is a great choice when it comes to building webapps of all kinds. Parcel supports Elm right out of the box without the need for any additional configuration.

<!-- index.html -->

<html>
  <body>
    <main></main>
    <script src="./index.js"></script>
  </body>
</html>
// index.js

import { Elm } from './Main.elm'

Elm.Main.init({
  node: document.querySelector('main')
})
-- Main.elm
module Main exposing (main)

import Browser
import Html exposing (h1, text)

main =
  h1 [] [ text "Hello, Elm!" ]

To learn more about Elm and its ecosystem of tools, see the official guide.

Help us improve the docs

If something is missing or not entirely clear, please file an issue on the website repository or edit this page.