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

Allow importing assets from parent folder #497

Closed
fson opened this issue Aug 26, 2016 · 3 comments
Closed

Allow importing assets from parent folder #497

fson opened this issue Aug 26, 2016 · 3 comments
Milestone

Comments

@fson
Copy link
Contributor

fson commented Aug 26, 2016

The app we are building with create-react-app is a part of a larger application, and resides in a subfolder of the repository. We wanted to load some JSON files from the parent folder, so we don't need to copy these configurations (used also by other parts of the app) to the subfolder.

Currently this results in an error, because files from the parent folder are not loaded with json-loader:

You may need an appropriate loader to handle this file type.

Would it make sense to loosen the include setting for certain loaders? We probably still want to exclude node_modules from the modules processed with babel-loader, but wouldn't it make sense to drop the include setting altogether from those loaders that already have include: [paths.appSrc, paths.appNodeModules]?

@gaearon
Copy link
Contributor

gaearon commented Aug 27, 2016

wouldn't it make sense to drop the include setting altogether from those loaders that already have include: [paths.appSrc, paths.appNodeModules]?

Let's do it. Want to send a PR?

@gaearon gaearon added this to the 0.3.0 milestone Aug 27, 2016
@fson
Copy link
Contributor Author

fson commented Aug 27, 2016

@gaearon I'll send a PR.

@kitze
Copy link

kitze commented Mar 23, 2017

@fson @gaearon what about importing js modules from a parent shared folder, is that possible?

@lock lock bot locked and limited conversation to collaborators Jan 22, 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