0

I setup react project by create-react-app and I found that the subfolder of react won't able to autoload when I create a new file, eg

<!-- file: /public/subfolder/index.html -->
<p>subfolder content here</p>

anyone knows how? According to the official react doc, it looks like react doesn't allow this kind pattern? Anyone knows more content?

1 Answer 1

1

This is not actually a restriction from React itself. That was how Webpack has configured in create-react-app. Please look at the below code snippet of a typical Webpack config file in a React application. If we need more custom configuration, we have to manually configure Webpack and Babel as per our requirements.

enter image description here

Link for the documentation: The best webpack configurations for React applications

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.