Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Should langcodes in webpack config be hardcoded? #61

Open
miloskroulik opened this issue Aug 29, 2019 · 2 comments
Open

Should langcodes in webpack config be hardcoded? #61

miloskroulik opened this issue Aug 29, 2019 · 2 comments
Assignees

Comments

@miloskroulik
Copy link
Collaborator

Looking at

I see that there is repeated block of code, with the only difference being the used langcode. Is this correct? We could have multiple languages in the future and it can become maintenance burden, if I understand the code correctly.

@dtoakley
Copy link
Member

From @fviejobueno who did a bit of research into this:

I was today researching how to avoid this multiple declarations of the HtmlWebPackPlugin to get the translations. What i have found is the usage of yet another plugin, i18n-webpack-plugin, so this one would handle the translations and handlebars the expressions. The idea of how to configure it i found it here

https://stackoverflow.com/questions/32515400/is-there-any-javascript-template-library-can-work-with-webpacks-i18n-plugin

@miloskroulik
Copy link
Collaborator Author

miloskroulik commented Aug 31, 2019

Hmm, I'm quite confused, probably because I'm no JS dev. Based on https://github.com/webpack-contrib/i18n-webpack-plugin i18n-webpack-plugin is deprecated (but with no replcement mentioned), but it's still documented in the webpack docs at https://webpack.js.org/plugins/i18n-webpack-plugin/ I guess that means we should try to use it. Thanks @fviejobueno for the research.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants