Editorial question127.5K views3,908 votes1 answer2,716 following
AI-generatedWhich plugin should keep only needed moment.js locales: IgnorePlugin or ContextReplacementPlugin?
I'm bundling an application that uses moment.js for date formatting across a small set of regions. Because moment loads locales through a dynamic require, webpack turns it into a context module and the production bundle ends up containing every locale file in the package, even though the app only formats dates in two or three of them. Webpack itself has no d