I have one page that requires fullcalendar which has moment as a dependency. I ended up copying moment.min.js directly to public/js rather than loading it through webpack. And, to be clear, I did the same with fullcalendar as well.
There's probably a "right way" to do this so you can bundle it, but ain't nobody got time for that.
Still... I'd like someone who knows the right way to pitch in. Maybe we can eventually learn the "right way".
So far - I'm not liking Webpack too much. Gulp is much, much easier to use. I'm not big on Vue and React either. They seem like good solid tools, but as you said - ain't nobody got time for that.
I've had trouble in the past with overriding settings with Mix Webpack, but thats because its new and needs to mature a bit more.
What I suggest, as posted from the link you supplied, is to import moment-mini and use that as a replacement for moments.js (to avoid the locale bloat).
https://github.com/ksloan/moment-mini
npm install moment-mini --save-dev
Then in your javascript, swap your require for moment-mini (I have mine situated in bootstrap.js):
Chiming in late, but the below worked for me. I do believe the IgnorePlugin is better suited than the ContextReplacementPlugin. Webpack docs show this exact approach for moment.js:
mix.webpackConfig({
plugins: [
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/)
]
})