Is there a reason why fsevents is in the optional dependencies at the react-scripts package? It's never used.
I think it's used by chokidar when it's installed. I _think_ the logic was that it's a nice enhancement for users on mac, but they would need to install it manually to get the benefits. By making it an optional dependency, it gets installed automatically on platforms where it's actually useful.
Yeah, it's correct, that it's used by chokidar, but chokidar has it already as dependency. And chokidar is used in react-error-overlay but not in react-scripts.
react-scripts transitively depends on chokidar through webpack I think.
But maybe you鈥檙e right, chokidar added it as an optional dependency in the last year, so it鈥檚 possible we don鈥檛 need to specify it anymore. I鈥檒l look into it soon.
I looked into this a little more. Chokidar has actually had it as an optionalDependency for a long time, but we added it here for a different reason back when we bundled everything together. We stopped bundling everything together in #1068, but the optionalDependency entry stuck around. So I _think_ it's ok if we remove it?
That makes sense. Maybe @gaearon or @fson can confirm that?
Most helpful comment
I looked into this a little more. Chokidar has actually had it as an optionalDependency for a long time, but we added it here for a different reason back when we bundled everything together. We stopped bundling everything together in #1068, but the optionalDependency entry stuck around. So I _think_ it's ok if we remove it?