Skip to content

wking-io/gatsby-plugin-elm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Gatsby plugin to handle elm files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published