Give devs more options for dynamically setting publicPath

This commit is contained in:
QWp6t
2017-01-09 16:22:23 -08:00
parent d06e72e20c
commit bdaf038248
4 changed files with 31 additions and 19 deletions

View File

@@ -1,8 +1,7 @@
/* eslint-env browser */
/* globals WEBPACK_PUBLIC_PATH */
/* globals SAGE_DIST_PATH */
// Dynamically set absolute public path from current protocol and host
if (WEBPACK_PUBLIC_PATH) {
// eslint-disable-next-line no-undef, camelcase
__webpack_public_path__ = `${location.protocol}//${location.host}${WEBPACK_PUBLIC_PATH}`;
/** Dynamically set absolute public path from current protocol and host */
if (SAGE_DIST_PATH) {
__webpack_public_path__ = SAGE_DIST_PATH; // eslint-disable-line no-undef, camelcase
}