monorepo-microservice-rbac/apps/aorta/scripts/loaders/fonts.loader.ts

12 lines
321 B
TypeScript
Raw Normal View History

2023-08-27 14:37:59 +08:00
export default {
test: /.(woff2?|eot|ttf|otf)$/, // 匹配字体图标文件
type: "asset", // type选择asset
parser: {
dataUrlCondition: {
maxSize: 10 * 1024, // 小于10kb转base64
}
},
generator: {
filename: 'static/fonts/[name].[contenthash:8][ext]', // 文件输出目录和命名
},
}