From ada45aff5e38256bf3d6f398be9da28ccc09e54e Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Mon, 24 Apr 2023 13:46:33 +0200 Subject: [PATCH] feat!: use Terser's default for comments By default, Terser keeps JSDoc-style comments that contain "@license" or "@preserve": https://terser.org/docs/api-reference#format-options Note that this is potentially a breaking changes as it may change the output bundle (increase in size). --- .../src/__tests__/__snapshots__/loadConfig-test.js.snap | 4 ---- packages/metro-config/src/defaults/index.js | 1 - 2 files changed, 5 deletions(-) diff --git a/packages/metro-config/src/__tests__/__snapshots__/loadConfig-test.js.snap b/packages/metro-config/src/__tests__/__snapshots__/loadConfig-test.js.snap index 4dcfd81abf..e64ebf497a 100644 --- a/packages/metro-config/src/__tests__/__snapshots__/loadConfig-test.js.snap +++ b/packages/metro-config/src/__tests__/__snapshots__/loadConfig-test.js.snap @@ -131,7 +131,6 @@ Object { }, "output": Object { "ascii_only": true, - "comments": false, "quote_style": 3, "wrap_iife": true, }, @@ -309,7 +308,6 @@ Object { }, "output": Object { "ascii_only": true, - "comments": false, "quote_style": 3, "wrap_iife": true, }, @@ -487,7 +485,6 @@ Object { }, "output": Object { "ascii_only": true, - "comments": false, "quote_style": 3, "wrap_iife": true, }, @@ -665,7 +662,6 @@ Object { }, "output": Object { "ascii_only": true, - "comments": false, "quote_style": 3, "wrap_iife": true, }, diff --git a/packages/metro-config/src/defaults/index.js b/packages/metro-config/src/defaults/index.js index 4e4cefd124..59142eeb04 100644 --- a/packages/metro-config/src/defaults/index.js +++ b/packages/metro-config/src/defaults/index.js @@ -110,7 +110,6 @@ const getDefaultValues = (projectRoot: ?string): ConfigT => ({ }, output: { ascii_only: true, - comments: false, quote_style: 3, wrap_iife: true, },