@sprit/console-tag
Version:

33 lines (30 loc) • 619 B
Markdown
# console message with color tags

## rspack
```typescript
rspack: (config, { appendPlugins, HtmlPlugin }) => {
appendPlugins(new ConsoleTagRspackPlugin({ HtmlPlugin }))
},
```
## webpack
```typescript
webpackChain(config, { HtmlPlugin }) {
config.plugin('tag').use(
new ConsoleTagWebpackPlugin(
{
HtmlPlugin,
git: {
branch: true,
hash: 7,
lastCommitDateTime: true,
},
custom() {
return {
构建版本: process.env.BUILD_VERSION ?? '-',
};
},
}
)
)
}
```