Skip to content

globally accessible vendor chunk  #1532

Closed
@alexsoin

Description

@alexsoin

Please tell me how to create a vendor.js file with global access dependencies (collected from imports located in the node_modules) through the esbuild during assembly, by analogy with the work of webpack chunks:

// webpack.config.js
...
optimization: {
  splitChunks: {
    chunks: 'all',
    maxInitialRequests: Infinity,
    minSize: 0,
    cacheGroups: {
    vendor: {
      test: /[\\/]node_modules[\\/]/,
      name: "vendor"
    },
    },
  },
}
...

How can I also collect two files of main.js and vendor.js in esbuild? I read the documentation and looked at the plugins, I could not find a solution for this problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions