CSS passed to createGlobalStyle isn't minified
Same here. Comments aren't removed either.
Maybe a missing isPureHelper import in https://github.com/styled-components/babel-plugin-styled-components/blob/ad289a02bb22fd885dcea8f55835d99cb9346be8/src/visitors/minify.js ?
Or missing export isCreateGlobalStyleHelper with isHelper in https://github.com/styled-components/babel-plugin-styled-components/blob/ad289a02bb22fd885dcea8f55835d99cb9346be8/src/utils/detectors.js ?
I have a simple but kinda verbose and ugly workaround. Change:
createGlobalStyle`/* Your css here */`
to:
createGlobalStyle`${css`/* Your css here */`}`
What's interesting is that tests for this case exists, and they pass for some reason 🤔 https://github.com/styled-components/babel-plugin-styled-components/tree/main/test/fixtures/minify-css-in-helpers