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 static files outside src and node_modules folders #504

Merged
merged 1 commit into from
Aug 28, 2016

Conversation

fson
Copy link
Contributor

@fson fson commented Aug 27, 2016

Remove the include setting from webpack loaders for CSS, JSON and other static assets.
This way it's possible to import files from a separate config folder, a parent directory etc.

Fixes #497.

Test plan:
Created a test-config.json with contents {} in the root folder of create-react-app and added import '../../test-config.json'; to template/src/App.js. The app started and was built successfully.

Remove the `include` setting from webpack loaders for CSS, JSON and other static assets.
This way it's possible to import files from a separate config folder, a parent directory etc.
@fson fson changed the title Allow importing static file outside src and node_modules folders Allow importing static files outside src and node_modules folders Aug 27, 2016
@ghost ghost added the CLA Signed label Aug 27, 2016
@gaearon gaearon added this to the 0.3.0 milestone Aug 27, 2016
@ghost ghost added the CLA Signed label Aug 27, 2016
@gaearon gaearon merged commit c27570e into facebook:master Aug 28, 2016
@gaearon
Copy link
Contributor

gaearon commented Aug 28, 2016

Looks good, thanks.

@fson fson deleted the load-files-outside-source-folder branch August 28, 2016 18:09
stayradiated pushed a commit to stayradiated/create-react-app that referenced this pull request Sep 7, 2016
…ebook#504)

Remove the `include` setting from webpack loaders for CSS, JSON and other static assets.
This way it's possible to import files from a separate config folder, a parent directory etc.
feiqitian pushed a commit to feiqitian/create-react-app that referenced this pull request Oct 25, 2016
…ebook#504)

Remove the `include` setting from webpack loaders for CSS, JSON and other static assets.
This way it's possible to import files from a separate config folder, a parent directory etc.
@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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants