Skip to content

crashmax-dev/webpack-userscript-template

Repository files navigation

🚀 Webpack userscript template

TypeScript WebPack

This template is based on Webpack and webpack-userscript, written in TypeScript.

Usage

Install a userscript manager

To use user scripts you need to first install a user script manager. Which user script manager you can use depends on which browser you use.

Install this userscript

webpack-userscript-template.user.js

Development

Change settings of Google Chrome

  • Navigate to chrome://flags/#allow-insecure-localhost, enable insecure localhost
  • Navigate to chrome://extensions/?id=dhdgffkkebhmkfjojejmpbldmpobfkfo (Chrome manage extensions page of Tampermonkey) and enable Allow access to file URLs (you need to manual reload page when dev userscript, see #475 for more detail)
  • pnpm install
  • pnpm dev
  • Open https://localhost:8080/webpack-userscript-template.proxy.user.js in browser (click Advanced -> proceed if it shows a security warning) to install the proxy script.