'url' | 'component''url'output.svgDefaultExport is used to configure the default export type of SVG files.
When output.svgDefaultExport is set to url , the default export of SVG files is the URL of the file. For example:
import logo from './logo.svg';
console.log(logo); // => asset urlWhen output.svgDefaultExport is set to component , the default export of SVG files is the React component of the file. For example:
import Logo from './logo.svg';
console.log(Logo); // => React ComponentAt this time, you can also specify the ?url query to import the URL, for example:
import logo from './logo.svg?url';
console.log(logo); // => asset url