SVGPlugin
Description
Allows importing .svg
graphics files into javascript source for use in styles
and as image source.
Usage
Setup
Import from FuseBox
const { SVGPlugin } = require("fuse-box");
Inject into a chain
fuse.plugin(SVGPlugin());
Or add it to the main config plugins list to make it available across bundles
FuseBox.init({
plugins: [SVGPlugin()],
});
Require file in your code
import logo from "./logo.svg";
Here is an example usage, and the source file that imports the SVG.
Options
None.
Test
To run tests
node test --file=SVGPlugin.test.ts