elm-community/elm-webpack-loader

Passing --optimize to elm make 0.19

sporto opened this issue · 1 comments

For building a production bundle in Elm 0.19 we should pass --optimize to elm make.
How do you pass this flag using this loader?

Thanks

This is how I do it using Webpack 2.

module.exports = {
  module: {
    rules: [{
      test: /\.elm$/,
      exclude: [/elm-stuff/, /node_modules/],
      use: {
        loader: 'elm-webpack-loader',
        options: {
          optimize: true
        }
      }
    }]
  }
};

But I figured it out by trial and error. It's such a common thing to do that maybe there should be a note about it in the readme.

edit: Nevermind, you made a PR already (#154).