@zohodesk/client_build_tool 0.0.11-exp.19.0 → 0.0.11-exp.20.0
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/lib/shared/bundler/webpack/custom_plugins/I18nNumericIndexPlugin/I18nGroupRuntimeModule.js
CHANGED
|
@@ -10,9 +10,8 @@ var _webpack = require("webpack");
|
|
|
10
10
|
class I18nGroupRuntimeModule extends _webpack.RuntimeModule {
|
|
11
11
|
constructor(options) {
|
|
12
12
|
super('i18n-group-loader');
|
|
13
|
-
this.options = {
|
|
14
|
-
i18nPublicPathVar: 'window.__I18N_CDN__'
|
|
15
|
-
...options
|
|
13
|
+
this.options = { ...options,
|
|
14
|
+
i18nPublicPathVar: options.i18nPublicPathVar || '(typeof window !== "undefined" && window.__I18N_CDN__)'
|
|
16
15
|
};
|
|
17
16
|
}
|
|
18
17
|
|
|
@@ -77,6 +76,9 @@ class I18nGroupRuntimeModule extends _webpack.RuntimeModule {
|
|
|
77
76
|
|
|
78
77
|
if (!base) {
|
|
79
78
|
base = __webpack_require__.p || '';
|
|
79
|
+
if (base && base.indexOf('/smap/') !== -1 && base.slice(-6) === '/smap/') {
|
|
80
|
+
base = base.slice(0, -6) + '/';
|
|
81
|
+
}
|
|
80
82
|
}
|
|
81
83
|
|
|
82
84
|
cachedI18nBase = ensureTrailingSlash(base);
|
|
@@ -113,8 +115,8 @@ class I18nGroupRuntimeModule extends _webpack.RuntimeModule {
|
|
|
113
115
|
.replace('[locale]', locale);
|
|
114
116
|
var i18nUrl = buildI18nUrl(relativePath);
|
|
115
117
|
|
|
116
|
-
if (typeof console !== 'undefined' && console.
|
|
117
|
-
console.
|
|
118
|
+
if (typeof console !== 'undefined' && console.log) {
|
|
119
|
+
console.log('[i18n-group:load]', groupName, i18nUrl);
|
|
118
120
|
}
|
|
119
121
|
|
|
120
122
|
|
|
@@ -175,8 +177,8 @@ class I18nGroupRuntimeModule extends _webpack.RuntimeModule {
|
|
|
175
177
|
.replace('[locale]', locale);
|
|
176
178
|
var i18nUrl = buildI18nUrl(relativePath);
|
|
177
179
|
|
|
178
|
-
if (typeof console !== 'undefined' && console.
|
|
179
|
-
console.
|
|
180
|
+
if (typeof console !== 'undefined' && console.log) {
|
|
181
|
+
console.log('[i18n-group:preload]', groupName, i18nUrl);
|
|
180
182
|
}
|
|
181
183
|
|
|
182
184
|
// Load i18n first, then the chunk
|