Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for preserving comments in code (#967)
Summary: Changelog: * **[Feature]**: Preserve comments in unminified builds, while continuing to strip all comments from minified builds. Add support for preserving comments in code. Useful for preserving `/*#__PURE__*/` annotations that aid tree shaking. NOTE: In a future version of Metro, the default minifier options will change to align with the underlying minifier's default, e.g. `comments: 'some'` in Terser. Pull Request resolved: #967 Test Plan: Test case here: microsoft/rnx-kit#2365 | | Size | | :----- | ------: | | Before | 1567764 | | After | 1258413 | | Diff | -309351 | Reviewed By: jacdebug Differential Revision: D45223689 Pulled By: motiz88 fbshipit-source-id: 89c1e4050e67c3c34ec74015986827425b5fc76c
- Loading branch information