Rollup plugin for seamless integration with Babel. Version 3.0.2 is the latest stable release. It allows transpiling ES6/7 code with Babel while preserving Rollup's tree-shaking and module resolution, avoiding intermediate files and sourcemap issues. Unlike running Babel before Rollup, this plugin handles transpilation per-file, preventing Babel helper duplication. Requires babel-core 6 or 7 as a peer dependency. Key differentiator: integrates directly into Rollup's plugin system, supporting .babelrc configuration and options like include/exclude patterns. Deprecated in favor of @rollup/plugin-babel as of Rollup 1.0.
npm install maptalks-rollup-plugin-babelNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic Rollup config with Babel plugin, excluding node_modules and disabling module transformation.
Replace with @rollup/plugin-babel: npm install @rollup/plugin-babel --save-dev and update import to require('@rollup/plugin-babel')Downgrade to version 1: npm install rollup-plugin-babel@1 --save-dev or upgrade to Babel 6+.
Ensure babel-core (not @babel/core) is installed: npm install babel-core@^7.0.0 --save-dev
In .babelrc or plugin options: set modules: false in preset config, e.g., ["@babel/preset-env", { "modules": false }]Add @babel/plugin-external-helpers to Babel plugins and set externalHelpers: true in rollup-plugin-babel options.
Install compatible babel-core: npm install babel-core@^7.0.0-bridge
Add '/node_modules/' to exclude or configure Babel correctly: set modules: false in presets.
Ensure Babel plugins are in array format: ["plugin-name", options] or just "plugin-name".