Skip to content

Commit

Permalink
chore(preset-icons): update unbuild config (#2998)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dunqing committed Aug 19, 2023
1 parent 02b06c2 commit 8df256a
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions packages/preset-icons/build.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,19 @@ export default defineBuildConfig({
return false
return external(id)
}
options.plugins!.unshift({
name: 'stub',
resolveId(id) {
if (id === 'debug')
return '@stub'
},
load(id) {
if (id === '@stub')
return 'export default function () {return ()=>{}}'
},
})
if (Array.isArray(options.plugins)) {
options.plugins.unshift({
name: 'stub',
resolveId(id) {
if (id === 'debug')
return '@stub'
},
load(id) {
if (id === '@stub')
return 'export default function () {return ()=>{}}'
},
})
}
},
},
})

0 comments on commit 8df256a

Please sign in to comment.