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

Fix watch mode when using presets #2072

Merged
merged 1 commit into from Jul 3, 2019
Merged

Fix watch mode when using presets #2072

merged 1 commit into from Jul 3, 2019

Conversation

mvestergaard
Copy link
Contributor

@mvestergaard mvestergaard commented Jun 27, 2019

This is a fairly naive attempt at fixing watch mode while using a preset.

The problem stems from the key of the configuration using the preset pointing to a folder, and in the end being ignored by chokidar.

The easy fix would be to just leave out any generates configuration that uses a prefix, but I've tried to make it do the right thing, by combining the key (assuming it's a path) with the configured extension (if one exists)

For config

some/folder:
  preset: near-operation-file
  presetConfig:
      extension: .generated.tsx

You should end up with an ignore of some/folder/**/*.generated.tsx

Related #2069

@dotansimha
Copy link
Owner

Great catch, thank you so much, @mvestergaard !

@dotansimha dotansimha merged commit b70d122 into dotansimha:master Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants