webpack-mapping-plugin
Webpack plugin for generating a mapping corresponding to the original file name and the output file name.
Usage
In your webpack.config.js
; moduleexports = // ... plugins: // ... ;
This will generate a mapping.json file in your root output directory with a mapping of all source file names to their corresponding output file, for example:
Configuration
A mapping is configurable using constructor options:
fileName: 'my-mapping.json' basePath: '/app/'
Options:
- fileName: The mapping filename in your output directory (mapping.json by default).
- basePath: A path prefix for all file references. Useful for including your output path in the mapping.(by default is '')
- stripSrc: removes unwanted strings from source filenames
- cache: In multi-compiler mode webpack will overwrite the mapping on each compilation. Passing a shared {} as the cache option into each compilation's MappingPlugin will combine the mapping between compilations.
Development Build
npm run compile