When i try to generate production build, it generates chunks with hash. I do not want that hash to be included in the chunks (Shown in below attached screenshot). How i can achieve that.?
Chunks from npm run build
Hope this helps: https://webpack.js.org/guides/caching/#output-filenames
const path = require('path');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: './src/index.js',
plugins: [
// new CleanWebpackPlugin(['dist/*']) for < v2 versions of CleanWebpackPlugin
new CleanWebpackPlugin(),
new HtmlWebpackPlugin({
title: 'Output Management',
}),
],
output: {
- filename: '[name].[contenthash].js',
+ filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
},
};