
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
tiny-webpack-userscript-plugin
Advanced tools
A tiny plugin to create Tampermonkey/Greasemonkey userscripts with webpack
- Allows one to bundle userscripts, using webpack
- It's one file: TinyWebpackUserscriptPlugin.ts
Check out the test project ./test/webpack.config.ts for a full example!
This could be your webpack.config:
import { resolve } from 'path';
import { TinyWebpackUserscriptPlugin } from 'tiny-webpack-userscript-plugin';
const buildDirectory = resolve(__dirname, './build');
const scriptName = 'TestScript';
export default {
mode: "development",
entry: `./${scriptName}.ts`,
plugins: [
new TinyWebpackUserscriptPlugin({
scriptName,
headers: [
{
name: scriptName,
author: 'jim',
license: 'MIT',
namespace: 'jim',
version: '0.1.0',
updateURL: `http://github.com/nfour/tiny-webpack-userscript-plugin/master/tree/test/build/${scriptName}.user.js`,
downloadURL: `http://github.com/nfour/tiny-webpack-userscript-plugin/master/tree/test/build/${scriptName}.user.js`,
}
],
developmentUrl: 'http://localhost:9002',
})
],
output: {
path: buildDirectory,
filename: `${scriptName}.user.js`
},
resolve: { extensions: ['.ts', '.js'] },
module: {
rules: [{
test: /\.ts$/, use: 'ts-loader', exclude: /node_modules/
}]
},
};
Tip: To produce multiple scripts, just export an array of webpack configs.
To compile and serve your userscripts at, for at http://localhost:9002/${scriptName}.user.js create a npm script like this:
{
"scripts": {
"dev": "concurrently 'yarn webpack --watch' 'yarn serve -l 9002 build'"
},
"devDependencies": {
"concurrently": "5.1",
"serve": "11.3"
}
}
FAQs
A tiny plugin to create Tampermonkey/Greasemonkey userscripts with webpack
The npm package tiny-webpack-userscript-plugin receives a total of 0 weekly downloads. As such, tiny-webpack-userscript-plugin popularity was classified as not popular.
We found that tiny-webpack-userscript-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.