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

Unnecessary space between adjacent comments #912

Comandeer opened this Issue Oct 8, 2018 · 0 comments


None yet
1 participant

Comandeer commented Oct 8, 2018

Describe the bug

There is unnecessary whitespace between adjacent comments when they are preserved using shouldPrintComment callback or comments: true option.

To Reproduce

/* First comment *//* Second comment */

Actual Output

/* First comment */ /* Second comment */

Expected Output

/* First comment *//* Second comment */


How are you using babel-minify?

babel-preset-minify in babel.config.js (but reproducible also using Babel Node API)

babel-minify version: 0.5.0

babel version : 7.1.2




module.exports = function ( api ) {
	api.cache( true );

	return {
		presets: [

		shouldPrintComment() {
			return true;

Additional context

Created minimal reproduction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment