Filter deployment bundles using .gitignore
Closed this issue ยท 3 comments
Sending dev resources such as .git
and node_modules
is not necessary during deployment so they should be filtered out. This will help with the archive file size.
I would love to use this feature too.
Solved in v1.1.1 and should be available soon. Note it requires the latest v2 core (v2.1.20)
Using .deployignore
to Ignore Files
There are times when you don't want specific files to be deployed, such as the node_modules
directory used in plugins and themes. This is possible by creating a .deployignore
file in the base directory of your plugin or theme. This file behaves the same as .gitignore
file where you can configure Git to ignore files you don't want to check in.
The following .deployignore
file will exclude the node_modules directory:
node_modules/
The file must be located at the base directory of the theme or plugin. For example:
- themes/demo/.deployignore
- plugins/acme/demo/.deployignore
Thank you!