mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-04 19:54:32 +08:00
[client-app] Fix build
Partially revert 3071856a8e
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
This commit is contained in:
parent
1105b2621f
commit
1485575e48
1 changed files with 6 additions and 6 deletions
|
@ -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'))) {
|
||||
|
|
Loading…
Add table
Reference in a new issue