text: import resolve from '@rollup/plugin-node-resolve'
  import commonjs from '@rollup/plugin-commonjs'
  import typescript from '@rollup/plugin-typescript'
  
  import { chromeExtension, simpleReloader } from 'rollup-plugin-chrome-extension'
  import zip from 'rollup-plugin-zip'
  
  const isProduction = process.env.NODE_ENV === 'production'
  
  export default {
    input: 'src/manifest.json',
    output: {
      dir: 'dist',
      format: 'esm',
    },
    plugins: [
      chromeExtension(),
      // adds a Chrome extension reloader during watch mode
      simpleReloader(),
      resolve(),
      commonjs(),
      typescript(),
      // Outputs a zip file in ./releases
      isProduction && zip({ dir: 'releases' }),
    ],
  }
  