pa11y-ci
pa11y-ci copied to clipboard
Add support for `.cjs` extension
Hey there,
I just added a small change to add support for .cjs
extensions. I think for most modern Javascript projects we use ES6 modules instead for CommonJS, so even for frameworks such as SvelteKit (what we use in our company) or Next.js the default setting for .js
files is module
(defined in package.json
). In such cases, we usually use .cjs
extension for CommonJS files.
I was unable to run pa11y-ci
with a custom config other than a JSON file because it was not allowing me to use a .js
file and the .cjs
extension was not recognized.
With the provided change, I can run pa11y
in our project.