8.0.0 • Published 5 years ago

next-plugin-styled-icons v8.0.0

Weekly downloads
9
License
MIT
Repository
github
Last release
5 years ago

next-plugin-styled-icons

Deprecated

NOTE: As of styled-icons v7.0.0, this plugin should no longer be required, and styled-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 = require('next-plugin-styled-icons')

module.exports = withStyledIcons()

If you're already using another plugin like @zeit/next-typescript, you can nest them like:

const withStyledIcons = require('next-plugin-styled-icons')
const withTypeScript = require('@zeit/next-typescript')

module.exports = withTypeScript(withStyledIcons())