How to use the svg-sprite-loader/runtime/sprite.build.stringify 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/sprite.build';

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

const pageContent = `






${spriteContent}

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


`;
github pluto-net / scinapse-web-client / app / helpers / htmlWrapper.tsx View on Github external
${helmet.title.toString()}
        ${helmet.script.toString()}
        ${helmet.meta.toString()}
        ${helmet.link.toString()}
        <style type="text/css" id="jss-server-side">${css}</style>
        
      
      
        
        ${sprite.stringify()}
        
        <div id="react-app">${reactDom}</div>
        ${scriptTags}
      
    
  `;
}
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 {
      spriteContent,
      ...initialProps,
    }
  }