-
Notifications
You must be signed in to change notification settings - Fork 502
Clear dist only when the new files are ready #578
Copy link
Copy link
Closed
Labels
PR welcomekind: featureNew feature or requestNew feature or requestscope: integrationRelated to an integration, not necessarily to core (but could influence core)Related to an integration, not necessarily to core (but could influence core)scope: upstreamIssue in upstream dependencyIssue in upstream dependencysolution: duplicateThis issue or pull request already existsThis issue or pull request already existssolution: unresolvedIssue has been closed by OP but root cause has not necessarily been resolvedIssue has been closed by OP but root cause has not necessarily been resolvedtopic: monorepoRelated to Lerna monoreposRelated to Lerna monorepos
Metadata
Metadata
Assignees
Labels
PR welcomekind: featureNew feature or requestNew feature or requestscope: integrationRelated to an integration, not necessarily to core (but could influence core)Related to an integration, not necessarily to core (but could influence core)scope: upstreamIssue in upstream dependencyIssue in upstream dependencysolution: duplicateThis issue or pull request already existsThis issue or pull request already existssolution: unresolvedIssue has been closed by OP but root cause has not necessarily been resolvedIssue has been closed by OP but root cause has not necessarily been resolvedtopic: monorepoRelated to Lerna monoreposRelated to Lerna monorepos
Current Behavior
When working with a monorepo or with linked package if your package was
buildand you have another bundler using the files indist. If you eitherbuildorstartthe compilation it will start by deleting the content ofdistwhich does not make bundler happy. In most cases you have to restart the bundler.Example:
Let say you have two packages
appis acreate-react-appandbis usingtsdx.appis usingb.You build the
bpackage, then start working onapp(react-scripts startinapp). But then you need to change something inbso you change some file then buildb(tsdx buildinb) at that pointreact-scriptswill crash because one file is missing and it will not recover even when the file are back. You have to restartappto make it work again.Desired Behavior
When
tsdx buildis run, it would be nice if thedistfolder was not cleared until the next build output is ready. This wayreact-scriptsand other bundlers would not fail.Suggested Solution
I guess it should be possible to build to a temp directory then move the files at the end.
Who does this impact? Who is this for?
People working with Monorepo or with linked packages.
Describe alternatives you've considered
Just restart the script when it fail but it's annoying...