Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #16561 #16562

Merged
merged 12 commits into from Apr 5, 2023

update snapshot after merge

4eaa6ab
Select commit
Failed to load commit list.
Merged

fix #16561 #16562

update snapshot after merge
4eaa6ab
Select commit
Failed to load commit list.
Deleted GitHub App / Copilot for PRs succeeded Apr 5, 2023 in 2m 3s

Analysis complete

Summary

This pull request adds a new feature that allows users to customize the container object for the AMD library type. It introduces a new option amdContainer for the output, ContainerPlugin, and ModuleFederationPlugin configurations, and updates the schemas, validation, and tests accordingly. It also modifies the AmdLibraryPlugin class to use the amdContainer option in the library output and hash computation.

Walkthrough

  • Add a new option amdContainer for the output configuration that allows specifying a custom container object for the AMD library type (link, link, link, link, link, link, link, link, link, link)
  • Implement the amdContainer option in the AmdLibraryPlugin class, which generates the source code for the AMD library output (link, link, link, link, link, link, link)
  • Add JSDoc annotation for the amdContainer option to the AbstractLibraryPlugin class, which is the base class for all library plugins (link)
  • Update the hash computation in the AmdLibraryPlugin class to include the amdContainer option (link)
  • Add tests for the amdContainer option with different AMD library types (amd, amd-require, amd-named) and custom container objects (link, link, link, link, link, link)
  • Add a new option amdContainer for the ContainerPlugin and ModuleFederationPlugin configurations that allows specifying a custom container object for the AMD module format (link, link, link, link)
  • Update the generated validation files for the ContainerPlugin and ModuleFederationPlugin schemas to reflect the new option (link, link)

Poem

Sing, O Muse, of the skillful pull request
That added amdContainer to the output options
And enabled the users of the swift-footed webpack
To customize the container of their AMD modules.

Emoji

🚀🛠️✅

Include these descriptions in your pull request description by including the following marker tags:

  • copilot:all: all the content, in one go
  • copilot:summary: a one paragraph summary of the code changes
  • copilot:walkthrough: a step by step walkthrough of the code changes
  • copilot:poem: a poem about the code changes!
  • copilot:emoji: three emoji that capture the changes

Feedback is welcome. Simply add a comment to this PR of the form /copilot feedback [your comments here].

Details

Copilot for PRs is a limited technical preview from GitHub Next.

It's aim is to make it easier to write pull request descriptions by providing automatically generated suggestions based on the code changes.

To find out more go to https://githubnext.com/projects/copilot-for-pull-requests or come and chat with us on Discord

Progress:

File Status Duration
Summary & Walkthrough ✅ Finished 115.4 seconds
lib/config/normalization.js ✅ Finished 80.1 seconds
lib/library/AmdLibraryPlugin.js ✅ Finished 83.9 seconds
schemas/WebpackOptions.check.js ✅ Finished 80.1 seconds
schemas/WebpackOptions.json ✅ Finished 82.6 seconds
schemas/plugins/container/ContainerPlugin.check.js ✅ Finished 80.1 seconds
schemas/plugins/container/ContainerPlugin.json ✅ Finished 82.3 seconds
schemas/plugins/container/ModuleFederationPlugin.check.js ✅ Finished 80.1 seconds
schemas/plugins/container/ModuleFederationPlugin.json ✅ Finished 84.9 seconds
test/Defaults.unittest.js ✅ Finished 85.1 seconds
test/Validation.test.js ✅ Finished 80.1 seconds
test/configCases/target/amd-container-named/index.js ✅ Finished 80.1 seconds
test/configCases/target/amd-container-named/webpack.config.js ✅ Finished 80.1 seconds
test/configCases/target/amd-container-require/index.js ✅ Finished 80.1 seconds
test/configCases/target/amd-container-require/webpack.config.js ✅ Finished 80.1 seconds
test/configCases/target/amd-container-unnamed/index.js ✅ Finished 80.1 seconds
test/configCases/target/amd-container-unnamed/webpack.config.js ✅ Finished 80.1 seconds