When building a project, the contents of the last entry point do not fall into the final assembly:

entry: { settings: "./table/static/table/js/script1.js", detail: "./table/static/table/js/script2.js" }, output: { path: __dirname + "/common/static/js", filename: "bundle.js" }, 

In the bundle.js code, the contents of script2.js . Why is that?

The file script2.js is in the dependency graph, which can be built on the webpack service http://webpack.imtqy.com/analyse/#modules

I correctly understand the principle of assembling a bundle - the contents of all entry points are combined in my case into one file? Or do I need to import all the objects from all the files that are involved in the project into one file?

  • It seems that the number of entry points must match the number of output files. but not sure - Grundy
  • one
    as far as I understand the docks, no. we can collect everything in one bundle, which we embed in the basic template, and we can break it down by chunks - while1pass
  • Yeah, so I messed up everything :) - Grundy
  • @Grundy I myself still dock at the docks) - while1pass
  • tried to set the entry point array? entry: ['pathToFile1', 'pathToFile2'] - Vasily Barbashev

0