在測試 SAP Spartacus 3.4.5 版本的 SSR 功能時,發現一個 warning 資訊:
console.warn(`Duplicated keys has been found in the config of i18n chunks:\n${dupes.join('\n')}`);
1
這個警告資訊在如下代碼裡抛出:
TranslationChunkService:
SAP Spartacus UI Duplicated keys has been found in the config of i18n chunks 方法:warnDuplicates
SAP Spartacus UI Duplicated keys has been found in the config of i18n chunks 原因是在 userAccount 和 common chunks 裡都存在 miniLogin 這個 key:
SAP Spartacus UI Duplicated keys has been found in the config of i18n chunks duplicate 的 key 如下圖所示:
SAP Spartacus UI Duplicated keys has been found in the config of i18n chunks 4.0 版本裡,就隻能找到一個miniLogin key 了:
vendor.js:
SAP Spartacus UI Duplicated keys has been found in the config of i18n chunks
SAP Spartacus UI Duplicated keys has been found in the config of i18n chunks 在 3.3.1 裡,确實在 common chunks 裡有 miniLogin 的 key:
SAP Spartacus UI Duplicated keys has been found in the config of i18n chunks