userscript-metadata-webpack-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.4.2 • Public • Published

userscript-metadata-webpack-plugin

userscript-metadata-webpack-plugin is a webpack plugin to generate userscript metadata comments for UserScript.

require:

  • webpack 5
  • nodejs >= 16

usage

you can find a full template project in webpack-userscript-template

install

npm i userscript-metadata-webpack-plugin -D

configure

webpack.config.js

const pkg = require('../package.json');
const {UserScriptMetaDataPlugin} = require('userscript-metadata-webpack-plugin');


const config = {
  // ...
  // ...
  plugins: [
    new UserScriptMetaDataPlugin({
      metadata: {...},
      test: /\.user\.js$/, // optional, default /\.user\.js$/
    }),
  ],
};

module.exports = config;

you can see more details about metadata here https://github.com/trim21/userscript-metadata-generator

/userscript-metadata-webpack-plugin/

    Package Sidebar

    Install

    npm i userscript-metadata-webpack-plugin

    Weekly Downloads

    71

    Version

    0.4.2

    License

    MIT

    Unpacked Size

    9.43 kB

    Total Files

    7

    Last publish

    Collaborators

    • trim21