Skip to content

Conversation

@dpvc
Copy link
Member

@dpvc dpvc commented Jan 20, 2022

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.json files included a11y/sre.ts as targets, which is no longer necessary since the a11y/sre module is self-contained (it may be that it wasn't necessary before, but including the old a11y/sre.ts wasn't a problem since it was just a small file with no need for shared code). So I've removed the a11y/sre.ts from all the targets.

The other issue was that the webpack files needs to refer to components/a11y/sre/lib not node_modules/speech-rule-engine/js. This array is a list of lib files (that were created by the components/bin/build command) for the comments whose code this new component is to share rather than include in itself. These are not the js libraries themselves. These provide the shared-code entry points, and webpack is directed to link against the lib versions of the files (which use the MathJax._ 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).

@dpvc dpvc requested a review from zorkow January 20, 2022 18:31
@zorkow zorkow merged commit 4a754c3 into sre4_components Jan 20, 2022
@zorkow zorkow deleted the sre4_update branch January 20, 2022 19:06
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.

3 participants