Closed yuliyan closed 5 months ago
Size Change: +657 B (+0.33%)
Total Size: 200 kB
Filename | Size | Change |
---|---|---|
./build/53.js |
1.08 kB | +37 B (+3.53%) |
./build/index.js |
126 kB | +521 B (+0.42%) |
./build/payment-gateway-suggestions.js |
6.56 kB | +99 B (+1.53%) |
Changes proposed in this Pull Request:
https://github.com/Automattic/wc-calypso-bridge/pull/1472 introduced loading translations for lazy loaded JS modules using
@automattic/i18n-loader-webpack-plugin
and a custom i18n loader module.However, due to
loadTranslations
function from the i18n loader being used only in the runtime template, it got removed from the production build by Webpack's tree-shaking, which resulted in errors in the console when trying to fetch the translations.This PR introduces some changes to ensure that the function is preserved in the production build and can be used in the runtime template.
How to test the changes in this Pull Request:
npm run build
.and
isEcommercePlanTrialparams to
true` in class-wc-calypso-bridge-shared.php./wp-admin/admin.php?page=wc-admin&path=%2Fmarketing
and confirm strings are rendered translated.Other information:
FOR PR REVIEWER ONLY: