1.0.2 • Published 5 years ago

@sdras/netlify-build-plugin-svgoptimizer v1.0.2

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

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