daaru00 / gridsome-plugin-i18n

Gridsome plugin for i18n
MIT License
53 stars 12 forks source link

How to use i18n only at build time, without adding to client JS bundle? #42

Open crabmusket opened 2 years ago

crabmusket commented 2 years ago

Is your feature request related to a problem? Please describe. I would like to use i18n at build time for generating HTML, but not at runtime. Currently, it seems that this package adds to app.js. In our case, disabling the i18n plugin reduced app.js from 770kB to 240kB.

Describe the solution you'd like Either documentation on how to achieve this with the existing configuration options, new options if they're needed to accommodate this.

Describe alternatives you've considered We could simply disable all JS from being included in our pages by tweaking index.html. But sometimes we do want some client-side JS, just not for i18n purposes.