Skip to content

vankop/side-effect-free-webpack-stat-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 be true if module is side effect free due to sideEffects flag
  • sideEffectFreeContent will be true if module code is side effect free, null for unknown state (webpack did not require to check this)

About

Add side effect free flag to webpack build stats

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published