trim21 / userscript-metadata-webpack-plugin

A webpack plugin help you to build userscript
8 stars 2 forks source link

inject metadata too early, when optimized, all metadata will dispappear #142

Open yzqdev opened 5 months ago

yzqdev commented 5 months ago

Description

when set optimization: { minimize: true}, all metadata will lost https://github.com/trim21/userscript-metadata-webpack-plugin/blob/5916ecb7322ca46358c4aba6c7892f7fdedede24/src/index.ts#L36-L39

https://webpack.js.org/api/compilation-hooks/#list-of-asset-processing-stages

we could inject metadata at PROCESS_ASSETS_STAGE_SUMMARIZE stage,this is after optimize process

trim21 commented 5 months ago

would you mind show a full webpack config?

yzqdev commented 5 months ago

would you mind show a full webpack config?

this the repo , dist contains optimized js and non-optimized js

https://github.com/yzqbugs/meta-bug