HTTPS webpack server + minor fixtures

This commit is contained in:
Tony Air 2018-02-07 11:29:20 +07:00
parent 6692660eca
commit 055f9f0d64
3 changed files with 13 additions and 11 deletions

View File

@ -9,7 +9,7 @@
"yarn": ">= 1.0.0" "yarn": ">= 1.0.0"
}, },
"scripts": { "scripts": {
"start": "cross-env NODE_ENV=development webpack-dev-server -d --config webpack.config.dev.js", "start": "cross-env NODE_ENV=development webpack-dev-server --https -d --config webpack.config.dev.js",
"dash": "cross-env NODE_ENV=development webpack-dashboard -- webpack-dev-server --config webpack.config.dev.js", "dash": "cross-env NODE_ENV=development webpack-dashboard -- webpack-dev-server --config webpack.config.dev.js",
"prebuild": "rimraf build", "prebuild": "rimraf build",
"build": "cross-env NODE_ENV=production webpack -p --config webpack.config.prod.js --progress" "build": "cross-env NODE_ENV=production webpack -p --config webpack.config.prod.js --progress"

View File

@ -75,7 +75,8 @@ class WebpackTemplateProvider extends Object implements TemplateGlobalProvider
{ {
$class = __CLASS__; $class = __CLASS__;
return sprintf( return sprintf(
'http://%s:%s/%s', '%s%s:%s/%s',
Director::protocol(),
$class::config()->get('hostname'), $class::config()->get('hostname'),
$class::config()->get('port'), $class::config()->get('port'),
$path $path

View File

@ -3,6 +3,7 @@
<%-- manifest="/cache.appcache" --%> <%-- manifest="/cache.appcache" --%>
<head> <head>
$MetaTags $MetaTags
<meta name="theme-color" content="#000000" /> <meta name="theme-color" content="#000000" />
<meta name="msapplication-navbutton-color" content="#000000" /> <meta name="msapplication-navbutton-color" content="#000000" />
<meta name="apple-mobile-web-app-status-bar-style" content="#000000" /> <meta name="apple-mobile-web-app-status-bar-style" content="#000000" />
@ -18,21 +19,21 @@
<link rel="preconnect" href="https://csi.gstatic.com" /> <link rel="preconnect" href="https://csi.gstatic.com" />
<link rel="preconnect" href="https://maps.googleapis.com" /> <link rel="preconnect" href="https://maps.googleapis.com" />
<link rel="preconnect" href="https://www.youtube.com"> <link rel="preconnect" href="https://www.youtube.com" />
<link rel="preconnect" href="https://i.ytimg.com"> <link rel="preconnect" href="https://i.ytimg.com" />
<link rel="preconnect" href="https://i9.ytimg.com"> <link rel="preconnect" href="https://i9.ytimg.com" />
<link rel="preconnect" href="https://s.ytimg.com"> <link rel="preconnect" href="https://s.ytimg.com" />
<% base_tag %> <% base_tag %>
<link rel="shortcut icon" type="image/x-icon" href="{$AbsoluteBaseURL}{$Project}/site/dist/icons/favicon.ico" /> <link rel="shortcut icon" type="image/x-icon" href="{$AbsoluteBaseURL}{$Project}/dist/icons/favicon.ico" />
<link rel="icon" sizes="144x144" type="image/png" href="{$AbsoluteBaseURL}{$Project}/site/dist/icons/android-chrome-144x144.png" /> <link rel="icon" sizes="144x144" type="image/png" href="{$AbsoluteBaseURL}{$Project}/dist/icons/android-chrome-144x144.png" />
<link rel="apple-touch-icon" href="{$AbsoluteBaseURL}{$Project}/site/dist/icons/apple-touch-icon.png" /> <link rel="apple-touch-icon" href="{$AbsoluteBaseURL}{$Project}/dist/icons/apple-touch-icon.png" />
<link rel="apple-touch-icon-precomposed" href="{$AbsoluteBaseURL}{$Project}/site/dist/icons/apple-touch-icon-precomposed.png" /> <link rel="apple-touch-icon-precomposed" href="{$AbsoluteBaseURL}{$Project}/dist/icons/apple-touch-icon-precomposed.png" />
<link rel="manifest" href="/manifest.webmanifest" /> <link rel="manifest" href="/manifest.webmanifest" />
<meta name="application-name" content="{$SiteConfig.Title}" /> <meta name="application-name" content="{$SiteConfig.Title}" />
<meta name="msapplication-TileImage" content="{$AbsoluteBaseURL}{$Project}/site/dist/icons/mstile-144x144.png" /> <meta name="msapplication-TileImage" content="{$AbsoluteBaseURL}{$Project}/dist/icons/mstile-144x144.png" />
<meta name="msapplication-TileColor" content="#2F98F1" /> <meta name="msapplication-TileColor" content="#2F98F1" />
<meta content="yes" name="apple-mobile-web-app-capable" /> <meta content="yes" name="apple-mobile-web-app-capable" />