A Gulp plugin to optimize Polymer 2 components by minifying HTML, JavaScript, and CSS. It uses Babel for JS transpilation (with presets like 'babili' or 'es2015'), cssclean for CSS minification, and integrates uglify-js for JS minification. Current stable version is 1.0.2. Release cadence is low; last update was around 2017. Useful for legacy Polymer 2 builds but no longer actively maintained.
npm install gulp-polymin2No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
This shows how to set up a Gulp task that uses gulp-polymin2 to optimize Polymer 2 HTML components.
Migrate to polymer-cli or @polymer/build.
Use correct option: { babelPresets: 'es2015' }.Explicitly set jsOptions to {} to enable uglify with defaults.Use babel-core@^6.0.0 or switch to a modern tool.
Install cssclean separately: npm install --save-dev cssclean.
Use require: var polymin = require('gulp-polymin2');Use babelPresets instead of babelPressets.