We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
What is the current behavior?
With the following code:
import * as barrel from './barrel'; console.log((barrel.something).nested);
Webpack will generate (notice the extra )):
)
(() => { /*!*********************!*\ !*** ./src/main.js ***! \*********************/ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _barrel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./barrel */ "./src/barrel.js"); console.log(_barrel__WEBPACK_IMPORTED_MODULE_0__.something).nested); })();
Under webpack 5.84.0, the code is correctly generated:
(() => { /*!*********************!*\ !*** ./src/main.js ***! \*********************/ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _barrel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./barrel */ "./src/barrel.js"); console.log(_barrel__WEBPACK_IMPORTED_MODULE_0__.something.nested); })();
If the current behavior is a bug, please provide the steps to reproduce.
https://github.com/edusperoni/webpack-import-paren-issue
Just run npm start
What is the expected behavior?
The parenthesis should be correctly stripped.
Other relevant information: webpack version: 5.85.0
Reverting the change inlib/dependencies/HarmonyImportSpecifierDependency.js from @bworline fixes the issue:
lib/dependencies/HarmonyImportSpecifierDependency.js
https://github.com/webpack/webpack/pull/17203/files#diff-96335405b47eef62b17ba6fe88f6b35a1e37c9cf98fd762fe74599aca1c65d94R318-R353
The text was updated successfully, but these errors were encountered:
Handle barrel imports (webpack#17305)
c8dc5fa
I have a fix for this.
Sorry, something went wrong.
Merge pull request #17307 from bworline/fix-17305
cc3fd6e
Handle barrel imports (#17305)
alexander-akait
Successfully merging a pull request may close this issue.
Bug report
What is the current behavior?
With the following code:
Webpack will generate (notice the extra
)
):Under webpack 5.84.0, the code is correctly generated:
If the current behavior is a bug, please provide the steps to reproduce.
https://github.com/edusperoni/webpack-import-paren-issue
Just run npm start
What is the expected behavior?
The parenthesis should be correctly stripped.
Other relevant information:
webpack version: 5.85.0
Reverting the change in
lib/dependencies/HarmonyImportSpecifierDependency.js
from @bworline fixes the issue:https://github.com/webpack/webpack/pull/17203/files#diff-96335405b47eef62b17ba6fe88f6b35a1e37c9cf98fd762fe74599aca1c65d94R318-R353
The text was updated successfully, but these errors were encountered: