You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.
Hi, not sure what causes this, but some of our clients attempts to load the default/fallback(?) locale files, (the ones not suffixed by _.json, i.e. Legend.json instead of Legend_en.json). We are seeing the following error in our logs:
["[esri.widgets.Widget]","widget-intl:locale-error","esri.widgets.Legend",{"details":{"errors":"[Array]"},"message":"Errors occurred while loading \"esri/widgets/Legend/t9n/Legend\"","name":"intl:message-bundle-error"}]
This happens because the plugin ignores copying these files, if the "locales" option is used. Maybe this is intentional, and there's actually a way to force clients to use a specific locale?
The following patch keeps the files:
diff --git a/node_modules/@arcgis/webpack-plugin/lib/requiredPlugins.js b/node_modules/@arcgis/webpack-plugin/lib/requiredPlugins.js
index 428465d..eada295 100644
--- a/node_modules/@arcgis/webpack-plugin/lib/requiredPlugins.js+++ b/node_modules/@arcgis/webpack-plugin/lib/requiredPlugins.js@@ -48,7 +48,7 @@ module.exports = function requiredPlugins(locales = []) {
}
const localesIgnoreList = locales.map((locale) => `*_${locale}`).join("|");
- const localesIgnoreGlob = `**/!(${localesIgnoreList}).json`;+ const localesIgnoreGlob = `**/!(${localesIgnoreList}|!(*_*)).json`;
const ignoreSass = "**/*.scss";
return [
// Copy non-packed resources needed by the app to the build directory
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi, not sure what causes this, but some of our clients attempts to load the default/fallback(?) locale files, (the ones not suffixed by _.json, i.e. Legend.json instead of Legend_en.json). We are seeing the following error in our logs:
["[esri.widgets.Widget]","widget-intl:locale-error","esri.widgets.Legend",{"details":{"errors":"[Array]"},"message":"Errors occurred while loading \"esri/widgets/Legend/t9n/Legend\"","name":"intl:message-bundle-error"}]
This happens because the plugin ignores copying these files, if the "locales" option is used. Maybe this is intentional, and there's actually a way to force clients to use a specific locale?
The following patch keeps the files:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: