K
K
KasAskar2019-06-20 06:31:10
React
KasAskar, 2019-06-20 06:31:10

No webpack.config.dev.js and webpack.config.prod.js file?

I watch a video tutorial about React, it works with the help CREATE REACT APP, and he executed the command npm run eject, and configa file appeared in the folder webpack.config.dev.jsand webpack.config.prod.js, but I don’t have it, is there only webpack.config.jsand webpackDevServer.config.jswhat could be the reason?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Spirin, 2019-06-20
@KasAskar

The current version of create-react-app generates webpack.config.js and webpackDevServer.config.js.

7
70iq, 2020-11-26
@ahtrewhr

I can assume that this is necessary to configure css modules, but here, in the new version of create react, you don’t need to poke around in the webpack config, to configure css modules, it’s enough to add module ( style.module.css ) to the css file name.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question