How to rename a file when I use the npm run build command. I want to generate a file with bundle.js name instead of 2.31b4fde6.chunk.js
How to rename a file when I use the npm run build command. I want to generate a file with bundle.js name instead of 2.31b4fde6.chunk.js
Use following syntax in webpack.config.js
module.exports = {
entry: './index.js',
output: {
filename: 'main.js',
path: path.resolve(__dirname, 'dist')
},
}
It will create main.js under dist folder.