Igorbek/typescript-plugin-styled-components

\t minification

HoraceSupertramp opened this issue · 2 comments

I just checked the minified output code of an application i developed using this plugin. Comes out that, unlike spaces, none of the tab characters within CSS template literals get omitted during minification.

As an example, the following styled components occurring in my project's code

const Header = styled.div`
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-weight: 600;
	padding: 0.8em 1.6em;
	background: peachpuff;
`;

gets compiled into

a=i.default.div.withConfig({displayName:"Header",componentId:"sc-m1ream"})`	display:flex;	align-items:center;	justify-content:space-between;	font-weight:600;	padding:0.8em 1.6em;	background:peachpuff;`

leaving those tabs behind. Isn't it supposed to remove those too?
Thank you in advance.

@HoraceSupertramp thank you for the report.
I'm sorry I missed your message first, it just got to my attention.
It's been fixed now and released in 1.4.4

@Igorbek I shall restore my .prettierrc to tabbed indentation. Thank you!