Update component files for changes to sre component #761
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The PR should resolve the problem you were having with loading the are components in the lab.
The main issue is that SRE was being included in both the semantic-enrich and explorer modules, and that caused duplication of the modules that seems to have triggered the export problem. The reason this was happening is that the
build.jsonfiles includeda11y/sre.tsas targets, which is no longer necessary since thea11y/sremodule is self-contained (it may be that it wasn't necessary before, but including the olda11y/sre.tswasn't a problem since it was just a small file with no need for shared code). So I've removed thea11y/sre.tsfrom all the targets.The other issue was that the webpack files needs to refer to
components/a11y/sre/libnotnode_modules/speech-rule-engine/js. This array is a list oflibfiles (that were created by thecomponents/bin/buildcommand) for the comments whose code this new component is to share rather than include in itself. These are not thejslibraries themselves. These provide the shared-code entry points, and webpack is directed to link against thelibversions of the files (which use theMathJax._versions of the objects) when they are imported rather than include the full library code. That is how the dynamically loaded components can share code with previously loaded components in the browser while still working in node directly (without the remapping that webpack does).