9

As title. I'm learning Webpack 5, and I just noticed there seems to be a concept called "layer" that is rarely mentioned(or I haven't found) in the documentation. It can be found here (for the intro. of top-level entry field):

    personal: {
      // ...
      layer: 'name of layer', // set the layer for an entry point
    },
  },
};

and here (for the built-in plugin SplitChunksPlugin):

splitChunks.cacheGroups.{cacheGroup}.layer

Assign modules to a cache group by module layer.

Are these two layers have the same meaning? If not, what are the definitions? Could you also point out the advantage(s) of using them? (I don't even know how to use it... at all)

NeoZoom.lua
  • 2,269
  • 4
  • 30
  • 64

0 Answers0