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?
acorn's ChainExpression is not correctly parsed. Variables are not correctly resolved to imports when optional chaining is used.
import test from './test'; console.log(test.a) console.log(test?.a)
compiles to
/* harmony import */ var _test__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./test */ "./src/test.js"); console.log(_test__WEBPACK_IMPORTED_MODULE_0__.default.a) console.log(test?.a)
If the current behavior is a bug, please provide the steps to reproduce.
https://github.com/SunriseFox/webpack-bug-optional-chaining
yarn && yarn start
What is the expected behavior?
should be
/* harmony import */ var _test__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./test */ "./src/test.js"); console.log(_test__WEBPACK_IMPORTED_MODULE_0__.default.a) console.log(_test__WEBPACK_IMPORTED_MODULE_0__.default?.a)
Other relevant information: webpack version: 5.0.0-beta.22 Node.js version: v12.16.3 Operating System: MacOS 10.15.5 Additional tools: none
The text was updated successfully, but these errors were encountered:
On board https://github.com/webpack/webpack/projects/5#card-37921062
Sorry, something went wrong.
@sokra FYI working on this..
Successfully merging a pull request may close this issue.
Bug report
What is the current behavior?
acorn's ChainExpression is not correctly parsed. Variables are not correctly resolved to imports when optional chaining is used.
compiles to
If the current behavior is a bug, please provide the steps to reproduce.
https://github.com/SunriseFox/webpack-bug-optional-chaining
yarn && yarn start
What is the expected behavior?
should be
Other relevant information:
webpack version: 5.0.0-beta.22
Node.js version: v12.16.3
Operating System: MacOS 10.15.5
Additional tools: none
The text was updated successfully, but these errors were encountered: