How to bundle a ReasonReact App
Which bundler (Webpack, Rollup, ...) do you use for moving a ReasonReact App to production and what does the config look like?
Bundling a ReasonReact app doesn't actually differ that much from bundling a "normal" JS app. The one thing I think you need to remember is to configure BuckleScript (via bsconfig.json) to output es6 instead of commonjs to enable tree shaking. Check this part of the BuckleScript docs out for more information on that.
To answer the question, I've personally used both webpack and Parcel to bundle ReasonReact apps, and I've never done any special configuration other than ensuring BuckleScript outputs es6 and not commonjs. BuckleScript actually does a lot of optimization out of the box already for reducing the size of your code. This is a topic of its own though.
Anyone else have input on how you usually do it, and whether it's different from a "normal" JS app?