@zohodesk/react-cli 1.1.19-exp.14 → 1.1.19-exp.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -51,7 +51,7 @@ const {
|
|
51
51
|
} = server;
|
52
52
|
const appPath = process.cwd();
|
53
53
|
const contextURL = disableContextURL ? '' : context;
|
54
|
-
const serverUrl =
|
54
|
+
const serverUrl = (0, _utils.getServerURL)(server, 'https');
|
55
55
|
const output = {
|
56
56
|
path: _path.default.join(appPath, outputFolder),
|
57
57
|
filename: 'js/[name].js',
|
@@ -228,7 +228,10 @@ class I18nDownlodLogic {
|
|
228
228
|
if(dataSrc === srcPath || dataSrc === fullsrcPath){ return resolve();}
|
229
229
|
}
|
230
230
|
var scriptTag = document.createElement("script");
|
231
|
-
scriptTag.onload =
|
231
|
+
scriptTag.onload = () => {
|
232
|
+
resolve();
|
233
|
+
scriptTag.onerror = scriptTag.onload = null;
|
234
|
+
};
|
232
235
|
scriptTag.onerror = function(event) {
|
233
236
|
var request = event && event.target && event.target.src || fullsrcPath;
|
234
237
|
var err = new Error("Loading I18N chunk " + chunkId + " failed.\\n(" + request + ")");
|
@@ -237,6 +240,7 @@ class I18nDownlodLogic {
|
|
237
240
|
delete installedI18nChunks[chunkId];
|
238
241
|
scriptTag.parentNode.removeChild(scriptTag);
|
239
242
|
reject(err);
|
243
|
+
scriptTag.onerror = scriptTag.onload = null;
|
240
244
|
};
|
241
245
|
${mainTemplate.requireFn}.nc && scriptTag.setAttribute("nonce", ${mainTemplate.requireFn}.nc);
|
242
246
|
scriptTag.src = fullsrcPath;
|