How to use the next-server/dist/server/utils.cleanAmpPath function in next-server

To help you get started, we’ve selected a few next-server 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 zeit / next.js / packages / next / pages / _document.tsx View on Github external
curStyles.push(child)
        }
      })
    }

    return (
      
        {children}
        {head}
        {amphtml && (
          <>
            
            
            {isDirtyAmp && }
            {/* https://www.ampproject.org/docs/fundamentals/optimize_amp#optimize-the-amp-runtime-loading */}
            
            {/* Add custom styles before AMP styles to prevent accidental overrides */}
            {styles && (
              <style> style.props.dangerouslySetInnerHTML.__html)
                    .join('')
                    .replace(/\/\*# sourceMappingURL=.*\*\//g, '')</style>