v.9.1.0 webpack warning (p2)

Author: RARgamesCreated Dec 19, 2025Updated Sep 23, 2026

Describe the bug When there is no date-fns-tz webpack shows a warning, but date-fns-tz is optional. A followup on #6154 warning. The previous warning is gone, but different warning appeared:

To Reproduce Install react-datepicker in a project with webpack, but without date-fns-tz

[client] Compiled with warnings.
[client]
[client] Critical dependency: the request of a dependency is an expression
[client]
[client] Search for the keywords to learn more about each warning.
[client] To ignore, add // eslint-disable-next-line to the line before.
[client]
[client] WARNING in ./node_modules/react-datepicker/dist/index.es.js 150:16-44
[client] Critical dependency: the request of a dependency is an expression
[client]
[client] webpack compiled with 1 warning

Expected behavior There should be no warning message

Source: Hacker0x01/react-datepicker