Never Punch Manticores

    @liuli-util/vite-plugin-svg-patch
    TypeScript icon, indicating that this package has built-in type declarations

    0.1.0 • Public • Published

    @liuli-util/vite-plugin-svg-patch

    Proper inlining of svg into the bundle is a patch to the existing vite issue (proposed late 2020).

    Use

    import { defineConfig } from 'vite'
    import vue from '@vitejs/plugin-vue'
    import { svgPatch } from '@liuli-util/vite-plugin-svg-patch'
    
    export default defineConfig({
      plugins: [vue(), svgPatch()],
    })

    Limitations

    Currently, there is no hook to handle image resources in vue style/css files that use background-image: url(""), probably a hook that can only be accessed internally by vite

    One idea is to use transformHook, but I don't want to deal with sourcemap or something like that for now, so I haven't tried it yet.

    Keywords

    none

    Install

    npm i @liuli-util/vite-plugin-svg-patch

    DownloadsWeekly Downloads

    2

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    11.9 kB

    Total Files

    12

    Last publish

    Collaborators

    • rxliuli