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
This commit is contained in:
committed by
Facebook Github Bot
parent
43157f974e
commit
520ffec7c9
@@ -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,
|
||||
})),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user