You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Adding support of multiple appSrc(s) in ModuleScopePlugin #4079
I'm currently working on a project which invovled two src folder (/src and /docs/src). And when I try to import files from /docs/src ModuleScopePlugin prevents me from doing it since /docs/src falls outside of /src.
So I'm wondering if ModuleScopePlugin can also accepts an array as its first parameter so that I can solve this problem with new ModuleScopePlugin([paths.appSrc, paths.docsSrc], [paths.appPackageJson]) (docsSrc is already defined in paths.js)
I'd accept a pull request to add support for this in ejected setups (by letting appSrc accept an array), but not a non-ejected one. If you want to use a folder other than src/, look out for monorepo support in react-scripts@2.x.
I'll close as unactionable by us.
Activity
Andarist commentedon Feb 26, 2018
Actually u can do something like this:
froyog commentedon Feb 27, 2018
@Andarist Yeah it is a workaround but I don't think it's the best practice to pass a folder path to
allowedFilesparametershttps://github.com/facebook/create-react-app/blob/e9abde739240b3124ab7237cbf32a370c209511e/packages/react-dev-utils/ModuleScopePlugin.js#L14
Andarist commentedon Feb 27, 2018
does it differ anyhow in results?
Timer commentedon Mar 5, 2018
I'd accept a pull request to add support for this in ejected setups (by letting
appSrcaccept an array), but not a non-ejected one. If you want to use a folder other thansrc/, look out for monorepo support inreact-scripts@2.x.I'll close as unactionable by us.