next-plugin-styled-icons
Deprecated
NOTE: As of
styled-icons
v7.0.0, this plugin should no longer be required, andstyled-icons
imports should work with Next.js out of the box.
A Next.js plugin to enable tree shaking for Styled Icons.
Installation
You should already have styled-icons
installed as per the Styled Icons README.
$ yarn add --dev next-plugin-styled-icons
Usage
Create or modify the next.config.js
configuration file (more information) and wrap it with the withStyledIcons
function:
const withStyledIcons = moduleexports =
If you're already using another plugin like @zeit/next-typescript
, you can nest them like:
const withStyledIcons = const withTypeScript = moduleexports =