Create-react-app: Remove fsevents from optionalDependencies

Created on 18 Dec 2019  路  5Comments  路  Source: facebook/create-react-app

Is there a reason why fsevents is in the optional dependencies at the react-scripts package? It's never used.

proposal

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?

All 5 comments

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?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alleroux picture alleroux  路  3Comments

dualcnhq picture dualcnhq  路  3Comments

stopachka picture stopachka  路  3Comments

ap13p picture ap13p  路  3Comments

fson picture fson  路  3Comments