mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-01 09:47:56 +08:00
Rollup-plugin-terser dropped Node <10 and Rollup <2 support (https://github.com/TrySound/rollup-plugin-terser/releases/tag/v6.0.0) and upgraded to Terser 5 (https://github.com/TrySound/rollup-plugin-terser/releases/tag/v7.0.0) DISABLE_THIRD_PARTY_CHECK=NPM update R=jacktfranklin@chromium.org Change-Id: Ifa0085fe5daa052bdfea40720d1852549f4bf316 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2537956 Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
28 lines
632 B
JavaScript
28 lines
632 B
JavaScript
import "./lib/transform.js";
|
|
import "./lib/mozilla-ast.js";
|
|
import { minify } from "./lib/minify.js";
|
|
|
|
export { minify } from "./lib/minify.js";
|
|
export { run_cli as _run_cli } from "./lib/cli.js";
|
|
|
|
export async function _default_options() {
|
|
const defs = {};
|
|
|
|
Object.keys(infer_options({ 0: 0 })).forEach((component) => {
|
|
const options = infer_options({
|
|
[component]: {0: 0}
|
|
});
|
|
|
|
if (options) defs[component] = options;
|
|
});
|
|
return defs;
|
|
}
|
|
|
|
async function infer_options(options) {
|
|
try {
|
|
await minify("", options);
|
|
} catch (error) {
|
|
return error.defs;
|
|
}
|
|
}
|