Rollup plugin for Google Apps Script that generates top-level function declarations from global object assignments, enabling local development with modern bundlers and deployment via clasp. Current stable version 2.0.2, with support for Rollup ^3.25.0 || ^4.0.0 and Vite ^4.4.9. Maintained by mato533, inspired by gas-webpack-plugin. Releases are occasional; latest includes dependency updates and gas-entry-generator options. Key differentiators: works with both Rollup and Vite, generates GAS-compatible bundle structure, supports TypeScript out of the box.
npm install rollup-plugin-google-apps-scriptVerified import paths — ran on the pinned version, not inferred.
Configures Vite with the gas plugin, setting input file, output directory, and GAS-specific options like manifest copy and entry generator settings.
Move comment option under gasEntryOptions.comment; see migration guide.
Use gasEntryOptions.comment instead.
Ensure all GAS-entry functions are assigned as global.property = ...
Use import gasPlugin from 'rollup-plugin-google-apps-script'
Upgrade Vite to ^4.4.9 or later.
Use import gasPlugin from 'rollup-plugin-google-apps-script'
Use import gasPlugin from 'rollup-plugin-google-apps-script' (not import { gasPlugin })Ensure assignment is like global.myFunc = () => {} and include pattern covers the file.