where is create-react-app webpack config and files?

后端 未结 10 1551
长发绾君心
长发绾君心 2020-11-28 18:33

I create a ReactJS project with the create-react-app package and that worked well, but I cannot find webpack files and configurations.

How does react-cr

10条回答
  •  温柔的废话
    2020-11-28 18:52

    I know it's pretty late, but for future people stumbling upon this issue, if you want to have access to the webpack config of CRA, there's no other way except you have to run:

    $ npm run eject
    

    However, with ejection, you'll strip away yourself from CRA pipeline of updates, therefore from the point of ejection, you have to maintain it yourself.

    I have come across this issue many times, and therefore I've created a template for react apps which have most of the same config as CRA, but also additional perks (like styled-components, jest unit test, Travis ci for deployments, prettier, ESLint, etc...) to make the maintenance easier. Check out the repo.

提交回复
热议问题