1.0.0 • Published 5 years ago

parcel-plugin-inject-svg v1.0.0

Weekly downloads
3
License
ISC
Repository
-
Last release
5 years ago

npm.io

This parcel plugin will check all img tags with an external svg and replace the tag with inline svg.

It uses the PostHTML feature of parcel

【What is Parcel】 【What is Parcel PostHTML】

Installation

add a .posthtmlrc to you root project, it will automatically trigger the plugin when the htmlBundler of parcel is called

{
  "plugins": {
    "posthtml-svg-inline": {
      "root": "src/templates"
    }
  }
}

To add the plugin to your existing project, run the below command.

npm i parcel-plugin-inject-svg -D

or

yarn add parcel-plugin-inject-svg -D

License

This project is licensed under the MIT License - see the LICENSE file for details