Skip to content

Instantly share code, notes, and snippets.

@eu90h
Created March 9, 2024 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eu90h/b4e1467cc5df21342846c0bb6d0e97a6 to your computer and use it in GitHub Desktop.
Save eu90h/b4e1467cc5df21342846c0bb6d0e97a6 to your computer and use it in GitHub Desktop.
This patch, intended for Mastodon v4.2 releases, changes some webpack settings so that I can actually build Mastodon on a VPS with low amounts of RAM.
diff --git a/config/webpack/production.js b/config/webpack/production.js
index cec810184..a5807830a 100644
--- a/config/webpack/production.js
+++ b/config/webpack/production.js
@@ -15,8 +15,9 @@ const sharedConfig = require('./shared');
const root = resolve(__dirname, '..', '..');
module.exports = merge(sharedConfig, {
+ parallelism: 1,
mode: 'production',
- devtool: 'source-map',
+ devtool: 'none',
stats: 'normal',
bail: true,
optimization: {
@@ -24,8 +25,8 @@ module.exports = merge(sharedConfig, {
minimizer: [
new TerserPlugin({
cache: true,
- parallel: true,
- sourceMap: true,
+ parallel: false,
+ sourceMap: false,
}),
],
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment