3

I am new to webpack and using it to bundle my react application to a single bundle file. However, when I run npx webpack command, it creates multiple bundle files prefixed with some random number.

Is there any webpack config which can help me avoid generating multiple bundle files prefixed with random numbers and can help me to generate a single bundle file?

My webpack config is

module.exports = {
  {
    output: {
      filename: 'index.bundle.js',
    },
    entry: './src/index.js',
    module:{
            rules:[
               { //using babel loader to transpile ES6 code},
               { //using eslint-loader},
               { //using style-loader, css-loader, sass-loader, url-loader, file-loader},
        ]
    }
  }

0 Answers0