Added the abillity to import js and jsx files with ts-loader #242
This PR adds the abillity for ts-loader to also process js and jsx files, and lets Jest pick them up as well.
This is good progress for if you want to migrate a large js app gradually to typescript
I'm not sure whether there's a smarter way to test it. I did it by editing the node_modules folder directly in this branch https://github.com/GeeWee/flatris/tree/react-scripts-ts-test
(if you want to test, fetch repo, run yarn install, and then git reset --hard to override)
(I also changed the prettier config in package.json as single quotes within double quotes doesn't work on windows)
I battled a little bit with Travis Turns out that I had to upgrade Jest, but Travis was caching the old version. I disabled the cache but then it started failing on Typescript which is only listed as a peerDependency, and not as a devDependency. I think the old tests might have worked because the typescript dependency was cached.
Anyway, I've updated the jest and ts-jest dependencies and added typescript as a devDependency.
If possible perhaps it should be possible to clear the jenkins cache for people with PRs? I don't have much experience to see if that's possible.