Title: Feature Request: Option to exclude node_modules
Last modified: April 19, 2018

---

# Feature Request: Option to exclude node_modules

 *  Resolved [jamiechong](https://wordpress.org/support/users/jamiechong/)
 * (@jamiechong)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/feature-request-option-to-exclude-node_modules/)
 * Thanks for a great plugin. I’m a developer that often uses node_modules to build
   static assets. This folder can take quite a lot of space. It would be great if
   there was an advanced option to exclude node_modules (or even let me provide 
   exclusions) in the root directory and all sub directories.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [lesleysm](https://wordpress.org/support/users/lesleysm/)
 * (@lesleysm)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/feature-request-option-to-exclude-node_modules/#post-10200604)
 * Thank you for your suggestion. We have this on our roadmap and will add it soon
 *  [sidewaysdesign](https://wordpress.org/support/users/sidewaysdesign/)
 * (@sidewaysdesign)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/feature-request-option-to-exclude-node_modules/#post-10207593)
 * I also hope this is added soon; migrating some older projects has been slow as
   molasses because of it (and node assets are useless bulk on the host anyway).
 * In the meantime, I’ve had success with more recent projects in locating node_modules,
   gulp, WebPack etc. up the tree into the same level directory as the WordPress“
   app” folder.
 * Other benefits of this arrangement are that you don’t need to .gitignore node_modules,
   and it won’t gum up project folders in text editors, either.
 *  Thread Starter [jamiechong](https://wordpress.org/support/users/jamiechong/)
 * (@jamiechong)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/feature-request-option-to-exclude-node_modules/#post-10594624)
 * [@sidewaysdesign](https://wordpress.org/support/users/sidewaysdesign/)
 * I found a solution. You can add a manual exclude with this filter
 * `ai1wm_exclude_content_from_export`
 * Add this to functions.php of your active theme.
 *     ```
       add_filter('ai1wm_exclude_content_from_export', function($exclude_filters) {
         $exclude_filters[] = 'themes/<YOUR-THEME-NAME>/node_modules';
         return $exclude_filters;
       });
       ```
   

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Feature Request: Option to exclude node_modules’ is closed to new replies.

 * ![](https://ps.w.org/all-in-one-wp-migration/assets/icon-256x256.png?rev=2458334)
 * [All-in-One WP Migration and Backup](https://wordpress.org/plugins/all-in-one-wp-migration/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/all-in-one-wp-migration/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/all-in-one-wp-migration/)
 * [Active Topics](https://wordpress.org/support/plugin/all-in-one-wp-migration/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/all-in-one-wp-migration/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/all-in-one-wp-migration/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [jamiechong](https://wordpress.org/support/users/jamiechong/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/feature-request-option-to-exclude-node_modules/#post-10594624)
 * Status: resolved