Skip to content

minifier: inline literal property values of readonly objects #10845

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

Open
sapphi-red opened this issue May 7, 2025 · 0 comments
Open

minifier: inline literal property values of readonly objects #10845

sapphi-red opened this issue May 7, 2025 · 0 comments
Labels
A-minifier Area - Minifier
Milestone

Comments

@sapphi-red
Copy link
Member

Compress

const sharedConfig = {
	context: void 0,
};
export function isHydrating(node) {
	return !!sharedConfig.context;
}

into

function isHydrating(node) {
	return false;
}

export { isHydrating };

Oxc playground
Rollup REPL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-minifier Area - Minifier
Projects
None yet
Development

No branches or pull requests

2 participants