{"id":26086,"library":"polymer-transpiler","title":"polymer-transpiler","description":"Polymer 1 to Polymer 2 transpiler that converts Polymer function-based elements into ES6 class syntax. Current version is 1.1.4-alpha, released as an unstable alpha with frequent breaking changes. It provides a CLI tool to search and transpile components, allowing customization of base class. Differentiators: specific focus on Polymer 1→2 migration, simple CLI usage, but no other major features or community support.","status":"deprecated","version":"1.1.4-alpha","language":"javascript","source_language":"en","source_url":"https://github.com/lukawski/polymer-transpiler","tags":["javascript"],"install":[{"cmd":"npm install polymer-transpiler","lang":"bash","label":"npm"},{"cmd":"yarn add polymer-transpiler","lang":"bash","label":"yarn"},{"cmd":"pnpm add polymer-transpiler","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package is ESM-only, no CommonJS export.","wrong":"const polymerTranspiler = require('polymer-transpiler')","symbol":"default","correct":"import polymerTranspiler from 'polymer-transpiler'"},{"note":"Named export for programmatic use.","wrong":"const { transpile } = require('polymer-transpiler')","symbol":"transpile","correct":"import { transpile } from 'polymer-transpiler'"},{"note":"Default export is the class.","wrong":"import { PolymerTranspiler } from 'polymer-transpiler'","symbol":"PolymerTranspiler","correct":"import PolymerTranspiler from 'polymer-transpiler'"}],"quickstart":{"code":"import polymerTranspiler from 'polymer-transpiler';\n\n// Example: transpile a single Polymer 1 element file\nconst input = `\n  <dom-module id=\"my-element\">\n    <template><span>{{text}}</span></template>\n    <script>\n      Polymer({\n        is: 'my-element',\n        properties: { text: { type: String } }\n      });\n    </script>\n  </dom-module>\n`;\n\nconst output = polymerTranspiler.transpile(input, { extends: 'Polymer.Element' });\nconsole.log(output);\n// Output will be ES6 class extending Polymer.Element","lang":"typescript","description":"Transpile a Polymer 1 element string to Polymer 2 class syntax"},"warnings":[{"fix":"Update scripts and references to use 'polymer-transpiler' instead of 'poly-transpiler'","message":"CLI name changed from 'poly-transpiler' to 'polymer-transpiler' in v1.1.0-alpha","severity":"breaking","affected_versions":">=1.1.0-alpha <1.1.0"},{"fix":"Migrate to modern web component frameworks (Lit, etc.)","message":"Polymer itself is deprecated; this transpiler is only relevant for legacy codebases","severity":"deprecated","affected_versions":">=0"},{"fix":"Pin to a specific version and test thoroughly before using in production","message":"Alpha stability: anything can change, no semver in alpha, may break without notice","severity":"gotcha","affected_versions":"<1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run: npm install -g polymer-transpiler","cause":"Package not installed globally or missing from node_modules","error":"Cannot find module 'polymer-transpiler'"},{"fix":"Use: import polymerTranspiler from 'polymer-transpiler' then call polymerTranspiler.transpile()","cause":"Incorrect import or using default import as named object","error":"TypeError: polymerTranspiler.transpile is not a function"},{"fix":"Provide a valid path with .html files containing Polymer({}) calls","cause":"CLI path option points to a directory without Polymer 1 elements","error":"Error: The specified path does not contain Polymer components"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}