next-plugin-styled-icons

v8.0.0
Next plugin to enable Styled Icons tree shaking
styled-icons nextjs

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())
npm i next-plugin-styled-icons

Metadata

  • MIT
  • Whatever
  • Jacob Gillespie
  • released 5/25/2019

Downloads

Maintainers