Skip to content
This repository has been archived by the owner on Dec 1, 2019. It is now read-only.

fix: checker should also watch change in json files #629

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

fix: checker should also watch change in json files #629

wants to merge 2 commits into from

Conversation

hackape
Copy link

@hackape hackape commented Apr 1, 2019

People using resolveJsonModule: true get at-loader error about their json export, because checker doesn't pick up changes in any .json files.

This patch add .json as a valid file extension to be considered changed.

background: https://stackoverflow.com/questions/54695319/awesome-typescript-loader-does-not-pick-up-changes-in-json

@jkytomak
Copy link

jkytomak commented May 6, 2019

Any chances to get this in?

src/instance.ts Outdated
@@ -364,7 +364,7 @@ export function readConfigFile(
}
}

let EXTENSIONS = /\.tsx?$|\.jsx?$/
let EXTENSIONS = /\.tsx?$|\.jsx?|.json$/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change needs to escape the period to work correctly.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corrected, thanks for review!

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.

None yet

3 participants