콘텐츠로 이동

StyledComponentsOptions

Defined in: core/index.ts:765

styled-components transform options (babel-plugin-styled-components-compatible).

optional cssProp?: boolean

Defined in: core/index.ts:800

Extract the <div css={...}> JSX prop into a module-level styled component (default: false). Opt-in, unlike babel-plugin-styled-components which defaults to true. Supports intrinsic / custom (including jsx_member_expression) / css\`template / object form /${expr}dynamic prop forwarding. On auto-inject, astyledbinding collision is automatically mangled to_styled/_styled2`.


optional displayName?: boolean

Defined in: core/index.ts:767

Auto-assign a displayName for devtools display (default: NODE_ENV !== “production”).


optional fileName?: boolean

Defined in: core/index.ts:771

Include the file name in componentId (default: true).


optional meaninglessFileNames?: string[]

Defined in: core/index.ts:785

List that makes the displayName prefix fall back to the parent dir when the basename is meaningless (default: ["index"]). Equivalent to the option of the same name in babel-plugin-styled-components.


optional meta?: boolean

Defined in: core/index.ts:802

Emit the [meta] marker (default: false).


optional minify?: boolean

Defined in: core/index.ts:773

Minify CSS whitespace (default: true).


optional namespace?: string

Defined in: core/index.ts:779

Namespace prefix for displayName / componentId — isolates multiple styled instances.


optional pure?: boolean

Defined in: core/index.ts:777

Tell the minifier that styled.X is side-effect-free (default: false).


optional ssr?: boolean

Defined in: core/index.ts:769

Deterministic componentId hash for stable SSR hydration (default: true).


optional topLevelImportPaths?: string[]

Defined in: core/index.ts:791

List of import sources to recognize as vendored forks (e.g. @my-org/styled, @my-org/*, @{my-org,co}/*). picomatch-compatible glob — *, ?, [abc]/[a-z]/[!abc], {a,b} (nesting allowed).


optional transpileTemplateLiterals?: boolean

Defined in: core/index.ts:775

Recognize template literals downleveled to modern JS (default: true).