Skip to content

Conversation

na2axl
Copy link

@na2axl na2axl commented May 16, 2024

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.

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.

1 participant