Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set babel cache directory inside build dir #3364

Closed
wants to merge 1 commit into from

Conversation

sheerun
Copy link
Contributor

@sheerun sheerun commented Dec 1, 2017

This can potentially fix #3276 and other similar issues.

Use case it fixes:

  1. Babel plugins do something that modifies files in .next directory (e.g. copies static files there)
  2. Babel creates caches in node_modules/.cache
  3. User makes some changes and next.js clears .next directory
  4. Build runs again, but babel sees cache in node_modules/.cache. It skips running babel plugins that should modify files in .next
  5. Suddenly the second time app is run .next is missing some files

I'm not 100% sure I'll fix things but has potential to make them better

@sheerun
Copy link
Contributor Author

sheerun commented Dec 1, 2017

I've checked it on local setup and it works wonderfully

@sheerun
Copy link
Contributor Author

sheerun commented Dec 1, 2017

Hmm it seems it might fix just use case when babel plugin outputs to .next. When webpack plugin or loader outputs something, the behaviour seems to be still unpredictable.

@sheerun sheerun closed this Dec 1, 2017
@lock lock bot locked as resolved and limited conversation to collaborators May 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The example "with-external-scoped-css" works randomly
1 participant