Thursday 20 April 2017

Is there a way to force Babel to preserve whitespace?

I like to keep everything look squarely when I write my code, and Babel is giving me a hard time :(

const describe = require("mocha").describe;
const it       = require("mocha").it;

becomes

const describe = require("mocha").describe;
const it = require("mocha").it;

I am using Babel with Grunt and tried the retainLines option, which sadly only preserves newlines (and even then, not exactly as the original).

Is there any option for Babel to preserve whitespace?



via Posh_Pumpkin

No comments:

Post a Comment