ranui
Version:
A framework-agnostic Web Components UI library built on native custom elements, with TypeScript types, light/dark theming, SSR and PWA support.
23 lines (22 loc) • 1.03 kB
TypeScript
import type { Plugin } from 'vite';
interface Options {
defaultImport?: string;
}
/**
* Loads `.svg` imports as raw strings.
*
* This used to carry an svgo optimisation pass behind an `svgo` option, and the `svgo`
* dependency with it. The pass was unreachable: both call sites disabled it, and both also set
* `defaultImport: 'raw'`, which returns above the optimisation branch anyway. The regex only
* admits `?raw` and `?skipsvgo` as queries, and neither can reach it either — so no
* configuration expressible here ever optimised anything. Removed along with the dependency;
* build output is byte-identical.
*
* If SVG optimisation is wanted later, run svgo over `assets/icons/*.svg` as a build step and
* commit the result — the icons are static, so paying for it on every dev-server request was
* never the right shape.
*
* `?skipsvgo` stays accepted so any stray import keeps resolving; it now behaves like `?raw`.
*/
export default function loadSvgPlugin(options?: Options): Plugin;
export {};