UNPKG

1.25 kBMarkdownView Raw
1# `babel-plugin-styled-components`
2
3This plugin is a highly recommended supplement to the base styled-components library, offering some useful features:
4
5- consistently hashed component classNames between environments (a must for server-side rendering)
6- better debugging through automatic annotation of your styled components based on their context in the file system, etc.
7- various types of minification for styles and the tagged template literals styled-components uses
8
9## Quick start
10
11Install the plugin first:
12
13```
14npm install --save-dev babel-plugin-styled-components
15```
16
17Then add it to your babel configuration:
18
19```JSON
20{
21 "plugins": ["babel-plugin-styled-components"]
22}
23```
24
25## Documentation
26
27**The documentation for this plugin lives on [the styled-components website](https://www.styled-components.com/docs/tooling#babel-plugin)!**
28
29- [Usage](https://www.styled-components.com/docs/tooling#usage)
30- [Better debugging](https://www.styled-components.com/docs/tooling#better-debugging)
31- [Minification](https://www.styled-components.com/docs/tooling#minification)
32
33## License
34
35Licensed under the MIT License, Copyright © 2016-present Vladimir Danchenkov and Maximilian Stoiber.
36
37See [LICENSE.md](./LICENSE.md) for more information.