This pull request introduces a comprehensive guide on using Chai with ECMAScript Modules (ESM) and plugins, specifically focusing on the chai-http plugin and best practices for plugin authors to expose globals sustainably.
Adds a new guide: A detailed guide titled "Using Chai with ESM and Plugins" is added, covering how to import Chai, use plugins like chai-http, and the nuances of importing vs. using globals across files.
Updates the Guide Index: The _guides/index.md file is updated to include a link to the new guide under the "Basics" section, ensuring easy access for users looking to integrate Chai with ESM and plugins.
Expands on Making Plugins: Within the "Making Plugins" section of _guides/index.md, a new subsection is introduced, offering guidance to plugin authors on how to expose globals in a sustainable manner, with examples of good and potentially problematic practices.
This pull request introduces a comprehensive guide on using Chai with ECMAScript Modules (ESM) and plugins, specifically focusing on the chai-http plugin and best practices for plugin authors to expose globals sustainably.
_guides/index.md
file is updated to include a link to the new guide under the "Basics" section, ensuring easy access for users looking to integrate Chai with ESM and plugins._guides/index.md
, a new subsection is introduced, offering guidance to plugin authors on how to expose globals in a sustainable manner, with examples of good and potentially problematic practices.See https://github.com/chaijs/chai/issues/1569#issuecomment-1921139662
For more details, open the Copilot Workspace session.