ronanyeah / elm-webpack

An Elm + Webpack boilerplate with live reload.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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(),
    ...
  ],
}

About

An Elm + Webpack boilerplate with live reload.


Languages

Language:Elm 43.4%Language:JavaScript 35.6%Language:HTML 15.5%Language:TypeScript 5.5%