Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support function type splitChunks #4333

Closed
Tracked by #4327
JSerFeng opened this issue Oct 16, 2023 · 3 comments
Closed
Tracked by #4327

Support function type splitChunks #4333

JSerFeng opened this issue Oct 16, 2023 · 3 comments
Assignees
Labels
contrib: has guidance good first issue Good for newcomers team The issue/pr is created by the member of Rspack.

Comments

@JSerFeng
Copy link
Collaborator

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
		    }
	    }
    }
}
@JSerFeng JSerFeng self-assigned this Oct 16, 2023
@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Oct 16, 2023
@hardfist
Copy link
Contributor

hardfist commented Jul 2, 2024

@JSerFeng is it supported now?

@stale stale bot removed the stale label Jul 2, 2024
@JSerFeng
Copy link
Collaborator Author

JSerFeng commented Jul 2, 2024

Yes, we can close this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contrib: has guidance good first issue Good for newcomers team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

No branches or pull requests

2 participants