webpack-userscript
webpack-userscript copied to clipboard
Question: How to write userscript in TypeScript?
Is it possible to write userscripts in TypeScript? Could you please provide an example project setup for this?
Yes, it is.
Actually the TypeScript support is not directly provided by this plugin, but by webpack and ts-loader.
Here is a minimal example to build an userscript project written in TypeScript.
Run npm install and run npm run build to have a try. 😃