chore: initial commit (#2906)

This commit is contained in:
贤心
2025-11-04 15:09:10 +08:00
committed by GitHub
parent 9e61ad04d9
commit 9ef38d8eeb
291 changed files with 160952 additions and 47199 deletions

View File

@@ -0,0 +1,19 @@
/**
* Rollup Custom Plugins
*/
// 压缩后添加头部注释
export function banner(options = {}) {
const bannerComment = options.comment || '';
return {
name: 'banner',
generateBundle(_, bundle) {
// chunk 生成后
for (const file of Object.values(bundle)) {
if (file.type === 'chunk') {
file.code = bannerComment + file.code;
}
}
},
};
}