pradel / create-react-app-esbuild

Use esbuild in your create-react-app for faster compilation, development and tests
MIT License
562 stars 34 forks source link

feat: add `svgrOptions` to customize svgr plugin behavior #44

Closed lpillonel closed 2 years ago

lpillonel commented 2 years ago

I needed to be able to pass svgr options (for me to be able to set the icon option to true) :

plugins: [
      {
        plugin: CracoEsbuildPlugin,
        options: {
          enableSvgr: true,
          svgrOptions: {
            icon: true,
          },
        },
      },
    ],

Closes #31

pradel commented 2 years ago

Thanks for the pr, can you please update the package README to show how to use the option? Code looks good will release a new version after this :)

lpillonel commented 2 years ago

Documentation added : )