momocow / webpack-userscript

A Webpack plugin for userscript projects. 🙈
https://cow.moe/webpack-userscript/
MIT License
201 stars 21 forks source link

Add support for multiple scripts #1

Closed shivam-tripathi closed 5 years ago

shivam-tripathi commented 6 years ago

I think by adding multiple entry points in webpack we can build multiple scripts. But there needs to be a way to specify script specific headers, as all scripts may not be having same headers.

momocow commented 6 years ago

Thanks for suggestion. I'll think about it. :)

momocow commented 6 years ago

Maybe the comment is a little bit too late.... but! If you have come out with any solutions, PR is always welcome.

Sorry for inconvenience, since I am not a full-time and keep working on another project these days. Maybe I'll come back to this package in the future, but not now.

Happy scripting ;)

shivam-tripathi commented 6 years ago

@momocow Hey, no inconvenience at all, in fact a great starting point for working with tampermonkey scripts. I was browsing through tools which could help me for a project I was supposed to work on in the coming months - when I stumbled across your tool :) The project is still WIP, and when I'll get to the tampermonkey script part, I'll make sure to try and find a solution to the wonderful tool you've developed! :) Again, thanks for being a open sourceror :D

momocow commented 5 years ago

Finally I'm back to this project again and pick up a totally different solution for integrating userscripts and Webpack. That is, make the package a Webpack plugin instead of a project starter kit to leave everything flexible and configurable for developers.

This changes also solves the issue for multiple entries, as anyone who is interesting in this can take a look at the test for multiple entries.

@shivam-tripathi I'll close this issues (a year after it was opened 😂). Feel free to reopen it or file a new one if there is anything unsolved.

momocow commented 5 years ago

The plugin is now available as webpack-tampermonkey@2.0.0 on NPM.