Tabs can import bundles directly using the full package name. i.e import '@sourceacademy/bundle-curve';.
Both bundles and tabs can import modules-lib: import { glAnimation } from '@sourceacademy/modules-lib/types';
When both the tab and bundle get built, a separate copy of modules-lib gets bundled into each. This causes there to be in effect, 2 instances of the glAnimation type, one used by the tab and one used by the bundle.
This means that at runtime, the glAnimation.isAnimation check can fail.
This issue of course will extend to any other modules-lib type, but right now there aren't any other types to extend from.
This issue also extends to types exported by bundles, since a tab is likely going to have its own copy of a bundle's code.
| Module |
What Fixed |
Fixed by |
curve |
Animations |
#640 |
rune |
- Hollusion Runes
- Animations
|
#640 |
Possible bundles to pay attention to:
communication
game
robot_simulation
Based on what I've seen, the conductor migration may require each bundle export much simpler types, which would help solve this problem.
Tabs can import bundles directly using the full package name. i.e
import '@sourceacademy/bundle-curve';.Both bundles and tabs can import
modules-lib:import { glAnimation } from '@sourceacademy/modules-lib/types';When both the tab and bundle get built, a separate copy of
modules-libgets bundled into each. This causes there to be in effect, 2 instances of theglAnimationtype, one used by the tab and one used by the bundle.This means that at runtime, the
glAnimation.isAnimationcheck can fail.This issue of course will extend to any other
modules-libtype, but right now there aren't any other types to extend from.This issue also extends to types exported by bundles, since a tab is likely going to have its own copy of a bundle's code.
curverunePossible bundles to pay attention to:
communicationgamerobot_simulationBased on what I've seen, the conductor migration may require each bundle export much simpler types, which would help solve this problem.