Skip to content

appzic/esbuild-plugin-styled-components

Repository files navigation

esbuild-plugin-styled-components-cover

esbuild plugin for styled components

npm npm GitHub

How to Install

npm install -D esbuild-plugin-styled-components

How to Use

esbuild.config.js

import * as esbuild from 'esbuild';
import styledComponentsPlugin from "esbuild-plugin-styled-components";

await esbuild.build({
    ...
    plugins: [
        styledComponentsPlugin({
            // filter: "\\.[tj]sx?$";              <-- Optional, type = string | RegExp
            // ssr: true;                          <-- Optional, type = boolean
            // displayName: false;                 <-- Optional, type = boolean
            // fileName: false;                    <-- Optional, type = boolean
            // meaninglessFileNames: [];           <-- Optional, type = string[]
            // minify: true;                       <-- Optional, type = boolean
            // transpileTemplateLiterals: false;   <-- Optional, type = boolean
            // pure: false;                        <-- Optional, type = boolean
            // topLevelImportPaths: [];            <-- Optional, type = string[]
            // namespace: undefined;               <-- Optional, type = string
        })
    ],
    ...
})

More details about options https://styled-components.com/docs/tooling

Contributing

We welcome contributions from the community! Please take a look at our CONTRIBUTING.md file for more information on how to get started. We appreciate all kinds of contributions, from bug reports and feature requests to code contributions and documentation improvements. Thank you for considering contributing to our project!

Contributors

License

Licensed under the MIT License.