xjs.js 669 B

123456789101112131415161718192021
  1. // xjs.js - Combined build (example)
  2. // This file is auto-generated/merged in production.
  3. // For dev, it imports animal and layer from window if loaded separately.
  4. (function(global) {
  5. // If we are in a merged environment, Layer and animal might be defined in closures above.
  6. // But here we simulate the final structure.
  7. // Ensure we have a global entry point if not already
  8. const x = global.animal || {};
  9. // Extend animal with Layer features if not present
  10. if (global.Layer && !x.Layer) {
  11. x.Layer = global.Layer;
  12. }
  13. // Export to global 'x' or 'xjs' as short alias?
  14. // global.x = x;
  15. })(typeof window !== 'undefined' ? window : this);