Skip to content

Docusaurus i18n build duplicates static assets per language, causing excessive site size #880

@willeastcott

Description

@willeastcott

Description:

We’re using Docusaurus with i18n enabled for the PlayCanvas Developer Site. The site is structured as follows:

  • docs/ – English documentation
  • i18n/ja/ – Japanese translations
  • static/ – Shared images and other static assets used by both languages

When building the site, Docusaurus appears to duplicate the entire static/ directory for each locale in the output (e.g. once for English, once for Japanese), even though the contents are identical.

Because the static/ folder contains a large number of images, this results in hundreds of megabytes of duplicated data per language. On GitHub Pages, where there is a hard 1 GB limit, this quickly becomes a serious problem as more locales or assets are added.

Expected behavior:

Ideally, shared static assets should be emitted only once and referenced by all locales, rather than copied per-language. At minimum, we should investigate a way to configure the build so that large shared assets are not duplicated across locale outputs.

Impact:

  • Significantly inflated build size
  • Risk of exceeding GitHub Pages size limits
  • Slower builds and deployments

Notes:

This may require:

  • A Docusaurus configuration change
  • A custom build step or plugin
  • Or restructuring how shared assets are handled

Raising this issue to track investigation and agree on a sustainable solution.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions