require
inside of a comment is parsed and treated as an actual import
#13831
Labels
require
inside of a comment is parsed and treated as an actual import
#13831
Describe the bug
Running dev build with
@mui/x-date-pickers
dependency and usingAdapterDayjs
produces an error on dev build (production build works without problems).The following source code is treated as an actual
require
statement, even though it is inside of a comment:We can address this issue on the
@mui/x
side by changing the comment content or the user can simply patch the package in the meantime, but it's still an interesting and inconsistent behavior between dev and production builds.Reproduction
mui/mui-x#9642 (comment)
Steps to reproduce
npm install
npm run dev
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: