@jebka/next-svg-sprite-loader
TypeScript icon, indicating that this package has built-in type declarations

1.1.7 • Public • Published

@jebka/next-svg-sprite-loader

Integrate @jebka/webpack-svg-sprite-loader into Next.js configuration

This is just a convenience package to make @jebka/webpack-svg-sprite-loader work with less configuration. All the steps can be done manually. See the docs of @jebka/webpack-svg-sprite-loader.

Installation

npm install --save-dev @jebka/next-svg-sprite-loader

Configuration

The plugin amends the webpack config for Next.js, so it needs to be called inside the webpack config hook function.

The convenience function mutates the config and also returns the same instance.

import { configSvgSprites } from "@jebka/next-svg-sprite-loader";

export default {
  webpack(config) {
    return configSvgSprites(config, {
      // SvgSpritePluginOptions
    });
  },
};

Manual Next.js configuration

See the code, it has inline commentary.

Package Sidebar

Install

npm i @jebka/next-svg-sprite-loader

Weekly Downloads

2

Version

1.1.7

License

MIT

Unpacked Size

6.76 kB

Total Files

5

Last publish

Collaborators

  • just-paja