Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

Add unused files plugin #58

Open
indebanvdhamer opened this issue Aug 2, 2018 · 0 comments
Open

Add unused files plugin #58

indebanvdhamer opened this issue Aug 2, 2018 · 0 comments

Comments

@indebanvdhamer
Copy link

This used to be in an older branch, but it might be useful to add this plugin whenever we run the stats command for example

 const path = require('path');
 const {UnusedFilesWebpackPlugin} = require('unused-files-webpack-plugin');
 const plugin = (cwd) => {
  console.log('=====', cwd, '=====');
  return new UnusedFilesWebpackPlugin({
    globOptions: {
      ignore: [
        'node_modules/**/*',
        '**/test.js',
        '**/*.test.js',
        '**/*.snap',
      ],
      cwd,
    },
  });
};
 module.exports = (config) => {
  console.log(config);
  return plugin(path.join(config.cwd, config.dotFile.app));
};
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant