Set dynamically aboslute public path on 'npm run watch'; fix http/htt… (#1696)

* Set dynamically aboslute public path on 'npm run watch'; fix http/https hardcoded in watch.js

* WEBPACK_PUBLIC_PATH fix
This commit is contained in:
Patrick Vézina
2016-08-26 13:45:50 -04:00
committed by Ben Word
parent 97c1a307ec
commit 7623ad0511
4 changed files with 13 additions and 7 deletions

View File

@@ -0,0 +1,8 @@
/* globals WEBPACK_PUBLIC_PATH */
// Dynamically set absolute public path from current protocol and host
if (WEBPACK_PUBLIC_PATH !== false) {
/* eslint-disable no-undef */
__webpack_public_path__ = location.protocol + '//' + location.host + WEBPACK_PUBLIC_PATH;
/*eslint-enable no-undef*/
}