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

fix(core): Explicitly name the axe module #857

Closed
wants to merge 2 commits into from
Closed

fix(core): Explicitly name the axe module #857

wants to merge 2 commits into from

Conversation

noead01
Copy link
Contributor

@noead01 noead01 commented Apr 21, 2018

Avoid the "Mismatched anonymous define() modules" error when the axe script is injected in a page that uses requireJS

Closes #849

PR Checklist

Please check if your PR fulfills the following requirements:

Description of the changes

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Avoid the "Mismatched anonymous define() modules" error when the axe script is injected in a page that uses requireJS

Closes #849
Avoid the "Mismatched anonymous define() modules" error when the axe script is injected in a page that uses requireJS

Closes #849
@@ -6,7 +6,8 @@ var axe = axe || {};
axe.version = '<%= pkg.version %>';

if (typeof define === 'function' && define.amd) {
define([], function () {
// Explicitly naming the module to avoid mismatched anonymous define() modules when injected in a page
define('aXe', [], function () {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be axe-core, not aXe, since that way it matches how to load it with require()

@noead01 noead01 closed this Apr 22, 2018
@noead01
Copy link
Contributor Author

noead01 commented Apr 22, 2018

Creating a new, cleaner PR

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.

When injected into a page, the axe script can override other anonymous modules loaded via requireJS
2 participants