Remove default plugin entrypoints for hot-reloading
Summary: As we stopped bundling plugins in D39276249, we no longer need the entry points for the bundled plugins (these entry points are always going to be empty) Reviewed By: lblasa Differential Revision: D39307565 fbshipit-source-id: 43751fe31c8bd962677c226b27cfe52093d3f2d4
This commit is contained in:
committed by
Facebook GitHub Bot
parent
94df830dfb
commit
642a3ebf81
35
desktop/scripts/remove-plugin-entry-points.tsx
Normal file
35
desktop/scripts/remove-plugin-entry-points.tsx
Normal file
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
/* eslint-disable flipper/no-console-error-without-context */
|
||||
|
||||
import fs from 'fs-extra';
|
||||
import path from 'path';
|
||||
import {rootDir} from './paths';
|
||||
|
||||
// TODO: Remove me in 2023 when everyone who is building flipper from source have legacy plugin entry points removed by this script
|
||||
|
||||
(async () => {
|
||||
await Promise.all(
|
||||
[
|
||||
path.resolve(rootDir, 'app/src/defaultPlugins'),
|
||||
path.resolve(rootDir, 'flipper-server-companion/src/defaultPlugins'),
|
||||
path.resolve(rootDir, 'flipper-server-core/src/defaultPlugins'),
|
||||
path.resolve(rootDir, 'flipper-ui-browser/src/defaultPlugins'),
|
||||
].map((dir) =>
|
||||
fs.rm(dir, {
|
||||
recursive: true,
|
||||
force: true,
|
||||
}),
|
||||
),
|
||||
);
|
||||
})().catch((err) => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user