This is cumbersome and can be especially error-prone in a monorepo because packages may get hoisted to a root depending on how project is configured.
This PR pre-configures include option by adding the appropriate glob paths by default so that users do not need to add it to their config.
How
By using require.resolve('react-strict-dom/package.json') to determine the installed path of react-strict-dom.
Users will still need to provide their application source code paths in their include option, so the default include and exclude paths are now always added to the config.
Why
ref. https://github.com/facebook/react-strict-dom/issues/236#issuecomment-2475731831
At the moment, users manually have to add react-strict-dom source files in their config.
This is cumbersome and can be especially error-prone in a monorepo because packages may get hoisted to a root depending on how project is configured.
This PR pre-configures
include
option by adding the appropriate glob paths by default so that users do not need to add it to their config.How
By using
require.resolve('react-strict-dom/package.json')
to determine the installed path of react-strict-dom.Users will still need to provide their application source code paths in their
include
option, so the defaultinclude
andexclude
paths are now always added to the config.Test Plan