Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run axe-core/react in development as part of frontend-platform #39

Open
davidjoy opened this issue Nov 22, 2021 · 0 comments
Open

Run axe-core/react in development as part of frontend-platform #39

davidjoy opened this issue Nov 22, 2021 · 0 comments
Labels
enhancement Relates to new features or improvements to existing features

Comments

@davidjoy
Copy link
Contributor

https://github.com/dequelabs/axe-core-npm/blob/develop/packages/react/README.md

axe-core is an accessibility testing library. In an effort to continue to support and promote accessible user experiences, we'd like to automatically run axe-core/react as part of development servers. The easiest way to enable this across MFEs would probably be to add it to frontend-platform as an optional service that starts during development (getConfig().ENVIRONMENT === 'development')

One subtlety here is removing the dependency in production, as it's quite large. The best way to do this, I think, is to conditionally load it using an import() function if we're in a development environment. During the build, webpack will ensure that the library is split out into its own file/chunk. This chunk will get deployed to prod, but won't run because it'll never be loaded. This seems like a fine compromise.

@arbrandes arbrandes moved this to Backlog in Frontend Working Group Jan 23, 2023
@arbrandes arbrandes added the enhancement Relates to new features or improvements to existing features label Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Relates to new features or improvements to existing features
Projects
Status: Backlog
Development

No branches or pull requests

2 participants