Skip to content

Support function type splitChunks #4333

Closed
@JSerFeng

Description

@JSerFeng

We should support function type configs of splitChunks.

For example,

config = {
    splitChunks: {
	    cacheGroups: {
		    shared: {
			    chunks: "all",
			    test: /shared/,
			    filename: data => `shared-${data.chunk.name || data.chunk.id}.js`,
			    enforce: true
		    },
		    common: {
			    chunks: "all",
			    test: /common/,
			    enforce: true
		    }
	    }
    }
}

Metadata

Metadata

Assignees

Labels

good first issueGood for newcomersteamThe issue/pr is created by the member of Rspack.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions