Skip to content

Supporting manifest files in TypeScript

Pre-release
Pre-release
Compare
Choose a tag to compare
@jacksteamdev jacksteamdev released this 13 Aug 00:07
· 788 commits to main since this release

This release adds support for manifest files as TS files in addition to JSON files.

Type checking and environment variables are here!

// rollup.config.js

export default {
  input: 'manifest.ts',
  output: { ... }
}
// manifest.ts

import { ManifestV3 } from 'rollup-plugin-chrome-extension'

const config: ManifestV3 = {
  content_scripts: [
    {
      js: ['content.ts'],
      matches: ['https://*/*', 'http://*/*'],
    },
  ],
  manifest_version: 3,
}

export default config

Beta Testing

You can install this branch on npm:

npm i rollup-plugin-chrome-extension@beta -D

v3.6.0-6...v3.6.0-7