@studyportals/webpack-helper 6.0.7-13 → 6.0.7-17
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.
package/package.json
CHANGED
|
@@ -31,17 +31,18 @@ class ChunksRetryPluginFactory {
|
|
|
31
31
|
const { retryChunksConfig } = preset;
|
|
32
32
|
let lastResortScript = ``;
|
|
33
33
|
if (retryChunksConfig.thresholdReachedCallBack) {
|
|
34
|
-
lastResortScript
|
|
35
|
-
${retryChunksConfig.thresholdReachedCallBack
|
|
34
|
+
lastResortScript += `
|
|
35
|
+
${retryChunksConfig.thresholdReachedCallBack}
|
|
36
36
|
`;
|
|
37
37
|
}
|
|
38
38
|
if (!retryChunksConfig.disableDefaultRollbarError) {
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
const rollbarInstanceIdentifier = retryChunksConfig.rollbarInstanceIdentifier || 'rollbar';
|
|
40
|
+
lastResortScript += `
|
|
41
|
+
if (!window || !window['${rollbarInstanceIdentifier}'] || !window['${rollbarInstanceIdentifier}'].error) {
|
|
41
42
|
return;
|
|
42
43
|
}
|
|
43
44
|
|
|
44
|
-
window['
|
|
45
|
+
window['${rollbarInstanceIdentifier}'].error(new Error('Failed to load chunk for after retries'));
|
|
45
46
|
`;
|
|
46
47
|
}
|
|
47
48
|
return lastResortScript;
|
|
@@ -41,6 +41,7 @@ class Configuration {
|
|
|
41
41
|
this.fileName = options.output.fileName || "[name]";
|
|
42
42
|
this.chunksRetryConfig = options.chunksRetryConfig || {
|
|
43
43
|
threshold: DEFAULT_CHUNKS_RETRY_CONFIG_THRESHOLD,
|
|
44
|
+
rollbarInstanceIdentifier: 'rollbar',
|
|
44
45
|
inject: this.preset === preset_1.Preset.VUE_TYPESCRIPT
|
|
45
46
|
};
|
|
46
47
|
}
|