mirror of
				https://github.com/mastermindzh/rickvanlieshout.com
				synced 2025-10-31 16:49:49 +01:00 
			
		
		
		
	Added vendor prefixes
This commit is contained in:
		| @@ -1,11 +1,15 @@ | ||||
| var rucksack = require('rucksack-css') | ||||
| var autoprefixer = require('autoprefixer') | ||||
| var lost = require("lost") | ||||
|  | ||||
| exports.modifyWebpackConfig = function(config, env) { | ||||
|     config.merge({ | ||||
|         postcss: [ | ||||
|             lost(), | ||||
|             rucksack() | ||||
|             rucksack(), | ||||
|             autoprefixer({ | ||||
|                 browsers: ['>1%', 'ie >= 10', 'safari >= 6', 'last 3 versions'] | ||||
|             }) | ||||
|         ] | ||||
|     }) | ||||
|  | ||||
|   | ||||
							
								
								
									
										19
									
								
								html.js
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								html.js
									
									
									
									
									
								
							| @@ -12,20 +12,7 @@ module.exports = React.createClass({ | ||||
|     render() { | ||||
|         const {body, route} = this.props | ||||
|         const title = DocumentTitle.rewind() | ||||
|  | ||||
|         const font = ` | ||||
|                           WebFontConfig = { | ||||
|                             google: { families: [ 'Roboto:400,500,700:latin,cyrillic' ] } | ||||
|                           }; | ||||
|                           (function() { | ||||
|                             var wf = document.createElement('script'); | ||||
|                             wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js'; | ||||
|                             wf.type = 'text/javascript'; | ||||
|                             wf.async = 'true'; | ||||
|                             var s = document.getElementsByTagName('script')[0]; | ||||
|                             s.parentNode.insertBefore(wf, s); | ||||
|                           })(); | ||||
|                       ` | ||||
|         const font = <link href='https://fonts.googleapis.com/css?family=Roboto:400,400italic,500,700&subset=latin,cyrillic' rel='stylesheet' type='text/css' /> | ||||
|         let css | ||||
|         if (process.env.NODE_ENV === 'production') { | ||||
|             css = <style dangerouslySetInnerHTML={ {    __html: require('!raw!postcss!./public/styles.css')} } /> | ||||
| @@ -40,11 +27,11 @@ module.exports = React.createClass({ | ||||
|               <title> | ||||
|                 { title } | ||||
|               </title> | ||||
|               { font } | ||||
|               { css } | ||||
|             </head> | ||||
|             <body> | ||||
|               <div id="react-mount" dangerouslySetInnerHTML={ {    __html: this.props.body} } /> | ||||
|               <script dangerouslySetInnerHTML={ {    __html: font} } /> | ||||
|               { css } | ||||
|               <script src={ prefixLink(`/bundle.js?t=${BUILD_TIME}`) } /> | ||||
|             </body> | ||||
|             </html> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user