From 520ffec7c9723d646a4f068e8462afb2467b98a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20B=C3=BCchele?= Date: Thu, 21 Feb 2019 09:36:41 -0800 Subject: [PATCH] removing entry, rootDir from defaultPlugins Summary: When bundling default plugins, we create a JSON-file containing information about the plugin and where to require it from. This information contained two filed: `entry` and `rootDir`, which were written while bundling the plugins. Because the plugins are bundled on Sandcastle, this was a path on the Sandcastle machine. This also happened for the OSS version, see the screenshot from a GitHub issue. Entry and rootDir are only used during the build process and not needed afterwards, so it is save to remove them from the JSON. https://pxl.cl/qQSx Reviewed By: passy Differential Revision: D14165679 fbshipit-source-id: 4e7c5ac25652758ccfc3a459f4dd197254c6f897 --- scripts/build-utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/build-utils.js b/scripts/build-utils.js index 26e47f7bc..92ef6c8b3 100644 --- a/scripts/build-utils.js +++ b/scripts/build-utils.js @@ -30,9 +30,9 @@ function compileDefaultPlugins(defaultPluginDir) { fs.writeFileSync( path.join(defaultPluginDir, 'index.json'), JSON.stringify( - defaultPlugins.map(plugin => ({ + defaultPlugins.map(({entry, rootDir, out, ...plugin}) => ({ ...plugin, - out: path.parse(plugin.out).base, + out: path.parse(out).base, })), ), ),