cache-uglifyjs-webpack-plugin

cache uglifyjs webpack plugin

Usage no npm install needed!

<script type="module">
  import cacheUglifyjsWebpackPlugin from 'https://cdn.skypack.dev/cache-uglifyjs-webpack-plugin';
</script>

README

cache-uglifyjs-webpack-plugin

安装

npm install cache-uglifyjs-webpack-plugin

配置

var CacheUglifyjsWebpackPlugin = require('cache-uglifyjs-webpack-plugin');
//cacheDirectory 为缓存目录  其他设置参考ugfily-js
var cacheJsPlugin = new CacheUglifyjsWebpackPlugin({
    cacheDirectory: '../temp',//缓存目录
    compress: {
        warnings: false
    }
});


module.exports = {
  ...
  plugins: [
    cacheJsPlugin
  ]
};