@sdras/netlify-build-plugin-svgoptimizer

1.0.2 • Public • Published

Netlify Build Plugin SVG Optimizer

This build plugin with take in a directory of SVG assets, and optimize them.

Usage

In the plugins, src, directory, add the path that the assets are in (last line in the yml below)

netlify.yml

build:
  publish: build
  lifecycle:
    init:
      - echo "Starting the build"
    build:
      - npm run build
    finally: echo "Ending the build"

plugins:
  # Local plugin
  - ./plugins/netlify-plugin-svg-optimizer:
      enabled: true
      src:
        # directory: where our svg assets are located. please note: this will overwrite the files in this directory
        directory: /src/assets/

Env Variable

For now, you will also need this in your environment variables:

  • NETLIFY_BUILD_LIFECYCLE_TRIAL - enabled=true

Package Sidebar

Install

npm i @sdras/netlify-build-plugin-svgoptimizer

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

4.22 kB

Total Files

3

Last publish

Collaborators

  • sdras