Created by: joeldenning
Currently CRA treats .cjs
files as asset/resource
files rather than javascript files. See https://nodejs.org/api/packages.html#determining-module-system for explanation of how the .cjs
file extension is treated by NodeJS.
I wasn't able to add tests to this PR because all of the tests failed epicly when I ran them locally, after following the instructions in CONTRIBUTING.md and swapping between Node 14, 16, and 17. I manually tested this change on a local create-react-app project to verify that CJS files are now processed as javascript. I expect the lack of tests will make this PR not mergeable, so any guidance on how to fix the many many errors that occur while running npx jest test/ --watchAll
is appreciated.