Skip to content
/ elm-webpack Public template

An Elm + Webpack boilerplate with live reload.

Notifications You must be signed in to change notification settings

ronanyeah/elm-webpack

Repository files navigation

Elm + Webpack example

Requirements


How to fetch dependencies

  • npm install

How to build

  • npm run build

How to develop


Notes

This scaffold uses Webpack 5, which removed the automatic Node.js polyfilling from previous Webpack versions. If this causes errors in your dependencies, you can emulate the effect in webpack.config.js:

{
  ...
  resolve: {
    fallback: {
      crypto: false,
      stream: false,
    },
  },
  plugins: [
    new webpack.ProvidePlugin({
      Buffer: ["buffer", "Buffer"],
    }),
    ...
  ],
}

Or by using node-polyfill-webpack-plugin:

const NodePolyfillPlugin = require("node-polyfill-webpack-plugin");

{
  ...
  plugins: [
    new NodePolyfillPlugin(),
    ...
  ],
}