Skip to content

Instantly share code, notes, and snippets.

@modernserf
Last active September 10, 2019 18:34
Show Gist options
  • Save modernserf/4d9b8a3fd86c9e4e3d6aa5249f585b8a to your computer and use it in GitHub Desktop.
Save modernserf/4d9b8a3fd86c9e4e3d6aa5249f585b8a to your computer and use it in GitHub Desktop.
How do I get the styled components plugin to work here?
// This code should have been transformed, right??
import styled from 'styled-components';
const Foo = styled.div`
color: pink;
`;
export { Foo };
const babel = require("rollup-plugin-babel");
module.exports = {
input: "src/index.js",
output: [
{
file: "build/main.js",
format: "cjs"
},
{
file: "build/module.js",
format: "esm"
}
],
plugins: [
babel({
plugins: ["styled-components"]
})
]
};
import styled from 'styled-components'
export const Foo = styled.div`
color: pink;
`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment