You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This pull request adds support for import statements with destructuring assignment in the ImportParserPlugin and fixes a bug in the JavascriptParser that affected dynamic imports with await. It also adds new test cases and warnings to cover the new functionality and the incompatible option.
Details
馃 Generated by Copilot at 3824bee
Add a helper function exportsFromEnumerable to the ImportParserPlugin class to format the requested exports from an import statement (link)
Refactor the use of Array.from with exportsFromEnumerable to avoid code duplication and improve readability (link)
Handle the case of import statements using destructuring assignment, such as const { default: def } = await import("./dir1/a");, by using the destructuringAssignmentPropertiesFor method from the JavascriptParser class and adding a warning if the webpackExports option is used (link, link, link)
Add test case files test/cases/chunks/destructuring-assignment/dir1/a.js, test/cases/chunks/destructuring-assignment/index.js, and test/cases/chunks/destructuring-assignment/warnings.js to verify the functionality and warnings of the ImportParserPlugin and the destructuringAssignmentPropertiesFor method (link, link, link)
The text was updated successfully, but these errors were encountered:
A pull request by @vankop was merged and maintainers requested a documentation change.
See pull request: webpack/webpack#16995
related to webpack/webpack#14800
Summary
馃 Generated by Copilot at 3824bee
This pull request adds support for import statements with destructuring assignment in the
ImportParserPlugin
and fixes a bug in theJavascriptParser
that affected dynamic imports withawait
. It also adds new test cases and warnings to cover the new functionality and the incompatible option.Details
馃 Generated by Copilot at 3824bee
exportsFromEnumerable
to theImportParserPlugin
class to format the requested exports from an import statement (link)Array.from
withexportsFromEnumerable
to avoid code duplication and improve readability (link)const { default: def } = await import("./dir1/a");
, by using thedestructuringAssignmentPropertiesFor
method from theJavascriptParser
class and adding a warning if thewebpackExports
option is used (link, link, link)test/cases/chunks/destructuring-assignment/dir1/a.js
,test/cases/chunks/destructuring-assignment/index.js
, andtest/cases/chunks/destructuring-assignment/warnings.js
to verify the functionality and warnings of theImportParserPlugin
and thedestructuringAssignmentPropertiesFor
method (link, link, link)The text was updated successfully, but these errors were encountered: