1 | # `babel-plugin-styled-components`
|
2 |
|
3 | This 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 |
|
11 | Install the plugin first:
|
12 |
|
13 | ```
|
14 | npm install --save-dev babel-plugin-styled-components
|
15 | ```
|
16 |
|
17 | Then add it to your babel configuration:
|
18 |
|
19 | ```JSON
|
20 | {
|
21 | "plugins": ["babel-plugin-styled-components"]
|
22 | }
|
23 | ```
|
24 |
|
25 | ## Changelog
|
26 |
|
27 | See [Github Releases](https://github.com/styled-components/babel-plugin-styled-components/releases)
|
28 |
|
29 | ## Documentation
|
30 |
|
31 | **The documentation for this plugin lives on [the styled-components website](https://www.styled-components.com/docs/tooling#babel-plugin)!**
|
32 |
|
33 | - [Usage](https://www.styled-components.com/docs/tooling#usage)
|
34 | - [Better debugging](https://www.styled-components.com/docs/tooling#better-debugging)
|
35 | - [Minification](https://www.styled-components.com/docs/tooling#minification)
|
36 |
|
37 | ## License
|
38 |
|
39 | Licensed under the MIT License, Copyright © 2016-present Vladimir Danchenkov and Maximilian Stoiber.
|
40 |
|
41 | See [LICENSE.md](./LICENSE.md) for more information.
|