From the create-react-app
documentation:
You don’t need to install or configure tools like Webpack or Babel.
They are preconfigured and hidden so that you can focus on the code.
So you have two way:
1- Create your project from scrath and define your Webpack config file.
2- Change create-react-app Webpack config file(you can find that file using this answers).
Either way for changing chunk names in Webpack you need to define your desired chunk names in Webpack config file (usually webpack.config.js):
module.exports = {
//...
output: {
//...
chunkFilename: '[id].js'
}
};
More details here.
You could also split chunk files using SplitChunksPlugin
. More details about it here.