File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,7 @@ interface Options {
150150 identifiers: CustomStyledIdentifiers ;
151151 ssr: boolean ;
152152 displayName: boolean ;
153+ minify: boolean ;
153154}
154155```
155156
@@ -190,6 +191,16 @@ To disable `displayName` generation set this option to `false`
190191
191192Default value is ` true ` which means that display name is being injected.
192193
194+ ### ` minify `
195+
196+ The option allows to turn on minification of inline styles used in styled components.
197+ It is similar to [ ` babel-plugin-styled-components ` ] ( https://github.com/styled-components/babel-plugin-styled-components ) 's same option.
198+ The minification is not exactly the same and may produce slightly different results.
199+
200+ :warning : ** Warning** : The minification is an experimental feature, please use with care.
201+
202+ Default value is ` false ` which means the minification is not being performed.
203+
193204### ` identifiers `
194205
195206This option allows to customize identifiers used by ` styled-components ` API functions.
@@ -201,11 +212,17 @@ This option allows to customize identifiers used by `styled-components` API func
201212interface CustomStyledIdentifiers {
202213 styled: string [];
203214 attrs: string [];
215+ keyframes: string [];
216+ css: string [];
217+ createGlobalStyle: string [];
204218}
205219```
206220
207221- ` styled ` - list of identifiers of ` styled ` API (default `[ 'styled'] )
208222- ` attrs ` - list of identifiers of ` attrs ` API (default `[ 'attrs'] )
223+ - ` keyframes ` - list of identifiers of ` keyframes ` API (default `[ 'keyframes'] )
224+ - ` css ` - list of identifiers of ` css ` API (default `[ 'css'] )
225+ - ` createGlobalStyle ` - list of identifiers of ` createGlobalStyle ` API (default `[ 'createGlobalStyle'] )
209226
210227Example
211228
Original file line number Diff line number Diff line change @@ -31,6 +31,13 @@ export interface Options {
3131 */
3232 displayName : boolean ;
3333
34+ /**
35+ * Allow minifying of inline styles in styled functions.
36+ * The minification is an experimental feature, please use with care.
37+ *
38+ * @defaultValue `false`
39+ * @experimental The minification feature is experimental.
40+ */
3441 minify : boolean ;
3542}
3643
You can’t perform that action at this time.
0 commit comments