Skip to content

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 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.

2 participants