在测试 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