Skip to content

antfu/vite-plugin-psvg

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 

PSVG Vite Plugin

PSVG - Programmable SVG for Vite

Install

Install

npm i vite-plugin-psvg -D # yarn add vite-plugin-psvg -D

Add it to vite.config.js

// vite.config.js
import PSVG from 'vite-plugin-psvg'

export default {
  plugins: [
    PSVG()
  ],
};

Then use it as normal SVGs or images.

<img src='./hello.psvg'>

Example

See the /example.

License

MIT License © 2020 Anthony Fu