Skip to content

MinibloxCheaters2/rolldown-plugin-userscript

 
 

Repository files navigation

rolldown-plugin-userscript

NPM License Downloads

Automatically parse metadata and set @grants.

With this plugin, @grants for GM_* functions will be added at compile time.

Usage

Add the plugin to rolldown.config.js:

import userscript from 'rolldown-plugin-userscript';

const plugins = [
  // ...
  userscript(meta => meta.replace('process.env.AUTHOR', pkg.author)),
];

Import the metadata file with a suffix ?userscript-metadata in your script:

import './meta.js?userscript-metadata';

About

I like my UserScript building in less than 3 seconds bruh

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 95.8%
  • JavaScript 4.2%