Skip to content

Prototype project that searches for the chunk loader in a Webpack JS file

License

Notifications You must be signed in to change notification settings

PotatoMaster101/chunk-search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chunk Search

A prototype project that searches for the chunk loader in a Webpack JS file, along with the chunk IDs.

Note

This is only a prototype for testing chunk loader extraction algorithms. This may or may not work for arbitrary Webpack sites.

Usage

Usage:
  ChunkSearch <file> [options]

Arguments:
  <file>  JS file containing the Webpack chunk loader

Options:
  --ast           Show chunk loader AST instead of JS code
  --id            Show chunk IDs
  --version       Show version information
  -?, -h, --help  Show help and usage information

Example

Samples JS files can be found under Samples/:

dotnet run -c release --project ChunkSearch -- ./Samples/small.js

Generate Webpack Files

Sample webpack project can be found under Webpack/. Generate Webpack files by:

cd ./Webpack
npm install
npm run build

The generated Webpack files will be under Webpack/dist/.