Skip to content

Commit

Permalink
fix(gatsby-plugin-netlify-cms): Fix minimizer for production builds w…
Browse files Browse the repository at this point in the history
…ith gatsby-plugins-netlify-cms (gatsbyjs#14783)
  • Loading branch information
emanueleperuffo authored and GatsbyJS Bot committed Jun 14, 2019
1 parent 7cdaff7 commit 1520e4a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/gatsby-plugin-netlify-cms/src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,13 @@ exports.onCreateWebpackConfig = (
* config, they cause issues for our pre-bundled code.
*/
mode: stage === `develop` ? `development` : `production`,
optimization: {},
optimization: {
/**
* Without this, node can get out of memory errors
* when building for production.
*/
minimizer: gatsbyConfig.optimization.minimizer,
},
devtool: stage === `develop` ? `cheap-module-source-map` : `source-map`,
}

Expand Down

0 comments on commit 1520e4a

Please sign in to comment.