feat: sync full workspace including web modules, docs, and configurations to Gitea
Optimized the root .gitignore to exclude virtual environments, node modules, and temp folders to ensure clean and lightweight version tracking. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
21
axhub-make/vite-plugins/addAxhubMarker.ts
Normal file
21
axhub-make/vite-plugins/addAxhubMarker.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import type { Plugin } from 'vite';
|
||||
|
||||
/**
|
||||
* 添加本项目标识
|
||||
* 在文件开头添加特殊标识,让第三方平台识别这是通过本项目打包的组件
|
||||
*/
|
||||
export function addAxhubMarker(): Plugin {
|
||||
return {
|
||||
name: 'add-axhub-marker',
|
||||
enforce: 'post',
|
||||
|
||||
generateBundle(options, bundle) {
|
||||
for (const chunk of Object.values(bundle)) {
|
||||
if (chunk.type !== 'chunk') continue;
|
||||
|
||||
const marker = `/* @axhub-factory */\n`;
|
||||
chunk.code = marker + chunk.code;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user