gatsby-plugin-elm

0.1.3 • Public • Published

gatsby-plugin-elm

Provides compiler support for Elm in gatsby.

Install

npm install --save gatsby-plugin-elm

How to use

  1. Include the plugin in your gatsby-config.js file.
  2. Write your Elm files as normal and import the Main file as seen in this example.
// in gatsby-config.js
plugins: [`gatsby-plugin-elm`];

If you need to pass options to Elm use the plugins options, see elm-webpack-loader for all available options.

// in gatsby-config.js
plugins: [
  {
    resolve: `gatsby-plugin-sass`,
    options: {
      forceWatch: true,
    },
  },
];

Default Options For Develop and Build

Since Gatsby has clear development and production modes this plugin sets some default behaviors depending on which is running:

Default Develop Options

  • debug: true
  • forceWatch: true

Default Production Options

  • optimize: true

NOTE: You can override either of these behaviors in the options object in your gatsby-config.js

Package Sidebar

Install

npm i gatsby-plugin-elm

Weekly Downloads

0

Version

0.1.3

License

MIT

Unpacked Size

4.7 kB

Total Files

5

Last publish

Collaborators

  • wking_io