Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support of multiple appSrc(s) in ModuleScopePlugin #4079

Closed
froyog opened this issue Feb 26, 2018 · 4 comments
Closed

Adding support of multiple appSrc(s) in ModuleScopePlugin #4079

froyog opened this issue Feb 26, 2018 · 4 comments

Comments

@froyog
Copy link
Contributor

froyog commented Feb 26, 2018

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)

@Andarist
Copy link
Contributor

Actually u can do something like this:

new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson, paths.docsSrc])

@froyog
Copy link
Contributor Author

froyog commented 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 allowedFiles parameters

constructor(appSrc, allowedFiles = []) {

@Andarist
Copy link
Contributor

does it differ anyhow in results?

@Timer
Copy link
Contributor

Timer commented Mar 5, 2018

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.

@Timer Timer closed this as completed Mar 5, 2018
@lock lock bot locked and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants