polymer-rename v4.3.2 is a build tool that preprocesses Polymer HTML templates so that Closure Compiler's ADVANCED optimizations can safely rename data-binding expressions and event handlers. It parses Polymer templates, extracts bindings like [[prop]] and on-event handlers, and emits synthetic JavaScript for Closure Compiler to analyze, enabling property renaming without breaking template references. This avoids the need to quote or export every property used in bindings, resulting in smaller output and better type checking. Unlike manual exports, polymer-rename automates the integration of Polymer with Closure Compiler. The library last updated for Polymer 2; no active releases since 2020 indicate maintenance status.
npm install polymer-renameNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates importing polymer-rename, parsing a Polymer HTML file, and extracting synthetic JavaScript for Closure Compiler.
Consider migrating to LitElement or using alternative tooling that supports modern Polymer patterns.
Ensure your HTML templates follow Polymer 2 conventions and are well-formed.
Upgrade to 4.x and use default import: `import polymerRename from 'polymer-rename'`.
Only pass the synthetic JS to Closure Compiler during compilation, then exclude from final output.
Run `npm install polymer-rename` and ensure import uses the correct name.
Use `import polymerRename from 'polymer-rename'` or `const polymerRename = require('polymer-rename')`.Ensure the input is a pure HTML template without script tags containing complex JS inside template strings.