@samitouri / QOS-React / commits / b4cbdc5a7c

remove terser from react-compiler-runtime build (#31326)

## Summary This fixes a minor nit I have about the `react-compiler-runtime` package in that the published code is minified. I assume most consumers will minify their own bundles so there's no real advantage to minifying it as part of the build. For my purposes it makes it more difficult to read the code, use `patch-package` (if needed), or diff two versions without referencing the source code on github or mapping it back to original source using the source maps. ## How did you test this change? I ran the build locally and looked at the result but did not run the code. It's a lot more readable except for the commonjs compatibility-related stuff that Rollup inserts.

Henry Q. Dineen committed Oct 22, 2024 at 19:49 UTC b4cbdc5a7c18672807e119692f99f1cf751242fd
1 file changed -6
compiler/packages/react-compiler-runtime/rollup.config.js
-6
@@ -11,7 +11,6 @@ import commonjs from '@rollup/plugin-commonjs';
11 import json from '@rollup/plugin-json';
12 import path from 'path';
13 import process from 'process';
14 -import terser from '@rollup/plugin-terser';
14 import banner2 from 'rollup-plugin-banner2';
15
16 const NO_INLINE = new Set(['react']);
@@ -37,11 +36,6 @@ const PROD_ROLLUP_CONFIG = {
36 rootDir: path.join(process.cwd(), '..'),
37 }),
38 commonjs(),
40 - terser({
41 - format: {
42 - comments: false,
43 - },
44 - }),
39 banner2(
40 () => `/**
41 * Copyright (c) Meta Platforms, Inc. and affiliates.