search-loader
Search across webpack resources
Installation
npm i --save-dev search-loader
Usage
Add the search loader configuration to the beginning of any loader chain to search among that file type
const webpackConfiguration = // ... module: rules: test: /\.js$/ use: loader: 'babel-loader' loader: 'search-loader' options: regex: /test/ 'g' output: path verbose: false // ... //...
Options
- regex: A regular expression to apply to the source. Don't forget the 'g' flag if you want to find all matches within a source file.
- output: An absolute file path to store the search results.
- verbose: Prints out search results and other debugging messages.