side-effect-free-webpack-stat-plugin
v1.0.1
Published
Add side effect free flag to webpack build stats
Downloads
12
Readme
side-effect-free-webpack-stat-plugin
Add side effect free flags to webpack build stats
Install
npm i --save-dev side-effect-free-webpack-stat-plugin
Usage
in webpack.config.js
const SideEffectFreeWebpackStatPlugin = require('side-effect-free-webpack-stat-plugin');
module.exports = {
plugins: [new SideEffectFreeWebpackStatPlugin()],
stats: {
modules: true
}
};
then in stats.json
in each module will be 2 fields:
sideEffectFreeModule
will betrue
if module is side effect free due to sideEffects flagsideEffectFreeContent
will betrue
if module code is side effect free,null
for unknown state (webpack did not require to check this)