From 1485575e4818e4241753632407f53de7093b33f0 Mon Sep 17 00:00:00 2001 From: Juan Tejada Date: Tue, 21 Feb 2017 15:54:02 -0800 Subject: [PATCH] [client-app] Fix build Partially revert 3071856a8e6d9f43a793508598003871ebbfe150 Symlinking instead of copying the error-logger-extensions prevents the app from finding the appropriate dependencies required in the error logger extensions in the main process and in the renderer processes because globalPaths are only set in renderer processes and /after/ error-logger-extensions are loaded. We should fix this properly in a separate diff, and move the error logger to isomorphic-core instead of copying it or symlinking it --- scripts/postinstall.es6 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/postinstall.es6 b/scripts/postinstall.es6 index 0d16cd5d5..f685e3cc2 100644 --- a/scripts/postinstall.es6 +++ b/scripts/postinstall.es6 @@ -21,11 +21,11 @@ function unlinkIfExistsSync(p) { } } -function linkErrorLoggerExtensions(privateDir) { - const from = path.join(privateDir, 'src', 'error-logger-extensions') - const to = path.resolve(path.join('packages', 'client-app', 'src', 'error-logger-extensions')) - unlinkIfExistsSync(to); - fs.symlinkSync(from, to, 'dir'); +function copyErrorLoggerExtensions(privateDir) { + const from = path.join(privateDir, 'src') + const to = path.resolve(path.join('packages', 'client-app', 'src')) + unlinkIfExistsSync(path.join(to, 'error-logger-extensions')); + fs.copySync(from, to); } async function installPrivateResources() { @@ -36,7 +36,7 @@ async function installPrivateResources() { return; } - linkErrorLoggerExtensions(privateDir) + copyErrorLoggerExtensions(privateDir) // link private plugins for (const plugin of fs.readdirSync(path.join(privateDir, 'packages'))) {