How to use the svg-sprite-loader/runtime/ function in svg-sprite-loader

To help you get started, we’ve selected a few svg-sprite-loader examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github JetBrains / svg-sprite-loader / examples / server-side-rendering / main.js View on Github external
import symbol from '../assets/twitter.svg';

// Import sprite instance which already contains twitter logo required above
import sprite from 'svg-sprite-loader/runtime/';

// Render sprite
const spriteContent = sprite.stringify();

const pageContent = `


<svg viewBox="${symbol.viewBox}">

github pluto-net / scinapse-web-client / app / helpers / htmlWrapper.tsx View on Github external
        <style type="text/css" id="jss-server-side">${css}</style>
        <div id="react-app">${reactDom}</div>
github sanjaytwisk / nextjs-ts / pages / _document.tsx View on Github external
public static async getInitialProps(ctx: DocumentContext) {
    const initialProps = await Document.getInitialProps(ctx)
    const spriteContent = sprite.stringify()

    return {