How to use the vendors.js function in vendors

To help you get started, we’ve selected a few vendors 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 tigranpetrossian / hacker-news-redesigned / src / server / index.js View on Github external
const client = getApolloClient();

  const jsx = (
    
      
        
      
    
  );

  const helmet = Helmet.renderStatic();

  // Generate script tags
  const scripts = manifest.client ? `
        
        
      `
    : ``;

  const gtag = `
    
    
  `;

  renderToStringWithData(jsx)
github fintory / kickup-react / internals / server / middlewares / reactApp.js View on Github external
${
        config('progressive.enabled')
          ? ``
          : ''
      }

      ${helmet.title.toString()}
      ${helmet.meta.toString()}
      ${helmet.link.toString()}
    `,
    scripts: `
      ${config('polyfillIo.enabled') &&
        ``}
      
      
    `,
  })

  res.set({ 'Cache-Control': 'no-cache' })
  res.send(
    minify(document, {
      removeAttributeQuotes: true,
      collapseWhitespace: true,
    })
  )
}
github namchey / linkpreview / app / Scrape / server.jsx View on Github external
let styles = '';

  let scripts = `
  
  `;

  const isProd = process.env.NODE_ENV === 'production';
  if(isProd) {
    styles = `
    
    
  `;

    scripts = `
    
    
    
  `
  }

  const history = createMemoryHistory();
  const authenticated = false;
  //const authenticated = req.isAuthenticated();

  const user = null;

  /*storeInitialState.user.authenticated = authenticated;
  storeInitialState.user.user = user;
  storeInitialState.app.host = req.clientConfig.host;
  storeInitialState.app.site = req.clientConfig.site;*/

  const metaProperties = {
github fuhcm / fptu-app / server / engine / index.js View on Github external
//eslint-disable-next-line
const manifest = require("../../dist/client/manifest.json");

const vendorCss = [manifest["vendors.css"], manifest["browser.css"]];
const vendorJs = [manifest["vendors.js"], manifest["browser.js"]];

export default ({ html, preState, helmet, bundles }) => {
  let styles = bundles.filter(bundle => bundle.file.endsWith(".css"));
  let scripts = bundles.filter(bundle => bundle.file.endsWith(".js"));

  return `