let foo = styled('div', {});
let foo = Object.assign({}, styled('div', {}), {
displayName: "foo"
});
$ npm install babel-plugin-transform-stitches-display-name
.babelrc
{
"plugins": ["transform-stitches-display-name"]
}
$ babel --plugins transform-stitches-display-name script.js
require("@babel/core").transform("code", {
plugins: ["transform-stitches-display-name"],
});
This plugin is adapted from @babel/plugin-transform-react-display-name many thanks to the Babel team.