mglaman / wasm-drupal

Drupal in WASM
https://wasm-drupal.mglaman.dev/
MIT License
22 stars 2 forks source link

Reduce the size of the Drupal archive #19

Open mglaman opened 6 days ago

mglaman commented 6 days ago

Currently the archive used is ~32MB~ 20MB.

The .gitattributes is being patched to have Composer ignore specific paths:

patches export-ignore
vendor/bin export-ignore
web/sites/default/files/php export-ignore

More need to be added. Probably all of the test directories.

4.4M is SQLite DB

mglaman commented 6 days ago

Next: add vendor/*/.github/**

mglaman commented 5 days ago

Currently there are ~4644 file sin /vendor.

Trying this to remove random files

vendor/**/.github/**/* export-ignore
vendor/**/*.md export-ignore
vendor/**/*.dist export-ignore
vendor/**/*.lock export-ignore
vendor/**/tests/**/* export-ignore

This resulted in ~4270 files. That's about 374 files. And a lot of ways to contribute .gitattributes to packages.

New size is 19M, opening a PR

mglaman commented 2 days ago

There is .gitattributes but also https://getcomposer.org/doc/04-schema.md#archive worth contributing to various projects