{"id":22005,"library":"rollup-plugin-es3","title":"rollup-plugin-es3","description":"Rollup plugin that removes ES3-incompatible constructs (Object.defineProperty and Object.freeze) from the bundled output. Version 1.1.0 is the latest stable release. It is a lightweight, focused alternative to large transpilers, specifically addressing rollup's __esModule marker and frozen objects for legacy environments.","status":"active","version":"1.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/futurist/rollup-plugin-es3","tags":["javascript","rollup","rollup-plugin","esModule","Object.defineProperty"],"install":[{"cmd":"npm install rollup-plugin-es3","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-plugin-es3","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-plugin-es3","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Default export is a function returning a plugin object.","symbol":"default","correct":"import es3 from 'rollup-plugin-es3'"},{"note":"Named export available for those who prefer explicit imports.","wrong":"const { rollupPluginES3 } = require('rollup-plugin-es3')","symbol":"named","correct":"import { rollupPluginES3 } from 'rollup-plugin-es3'"},{"note":"TypeScript users can import the options type.","symbol":"type","correct":"import type { RollupPluginES3Options } from 'rollup-plugin-es3'"}],"quickstart":{"code":"import { rollup } from 'rollup';\nimport es3 from 'rollup-plugin-es3';\n\nconst bundle = await rollup({\n  input: 'src/index.js',\n  plugins: [es3()],\n});\nawait bundle.write({ file: 'dist/bundle.js', format: 'iife' });","lang":"javascript","description":"Shows basic usage of the plugin: install, import, and add to rollup plugins array."},"warnings":[{"fix":"Use additional plugins (e.g., rollup-plugin-es5) for broader ES3 compatibility.","message":"Plugin only removes Object.defineProperty and Object.freeze; it does not handle other ES3 incompatibilities like reserved words or trailing commas.","severity":"gotcha","affected_versions":"all"},{"fix":"Update to v1.0.2+; pass { remove: ['freeze'] } to re-enable.","message":"v1.0.2 removed support for Object.freeze removal by default (breaking change if relied on).","severity":"breaking","affected_versions":"<1.0.2"},{"fix":"Use explicit option { remove: ['freeze'] } if needed.","message":"Object.freeze removal is disabled by default since v1.0.2 and may be removed entirely.","severity":"deprecated","affected_versions":">=1.0.2"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Ensure plugin is installed and added to rollup plugins array: plugins: [es3()]","cause":"Plugin not applied or configured incorrectly.","error":"Error: \"Object.defineProperty is not defined\""},{"fix":"Use import es3 from 'rollup-plugin-es3' or const es3 = require('rollup-plugin-es3').default","cause":"Default import used with require instead of import.","error":"TypeError: es3 is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}