修复文件上传和下单支付流程
This commit is contained in:
@@ -33,9 +33,28 @@ function elementPlusChunk(id: string) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
function stripVantRemoteIconFont() {
|
||||
return {
|
||||
name: 'strip-vant-remote-icon-font',
|
||||
generateBundle(_options, bundle) {
|
||||
for (const chunk of Object.values(bundle)) {
|
||||
if (chunk.type !== 'asset' || typeof chunk.source !== 'string') continue
|
||||
if (!chunk.fileName.endsWith('.css')) continue
|
||||
|
||||
// Vant 图标字体已经内联了 woff2,这里去掉远程 woff 备用地址,避免触发 CSP 外链字体拦截。
|
||||
chunk.source = chunk.source.replace(
|
||||
/,url\(\/\/at\.alicdn\.com\/t\/c\/font_2553510_ciljc7axaw7\.woff\?t=1705587463221\) format\("woff"\)/g,
|
||||
''
|
||||
)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
vue(),
|
||||
stripVantRemoteIconFont(),
|
||||
AutoImport({
|
||||
resolvers: [ElementPlusResolver()],
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user