• Resolved jamiechong

    (@jamiechong)


    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)
  • Thank you for your suggestion. We have this on our roadmap and will add it soon

    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

    (@jamiechong)

    @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.