Skip to content

Commit

Permalink
fix: client setup path resolve, close #708
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Sep 14, 2022
1 parent 0b8df5a commit ffeccff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/slidev/node/plugins/setupClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ export function createClientSetupPlugin({ clientRoot, themeRoots, addonRoots, us
enforce: 'pre',
async transform(code, id) {
if (id.startsWith(setupEntry)) {
const name = id.slice(setupEntry.length + 1)
const name = id
.slice(setupEntry.length + 1)
.replace(/\?.*$/, '') // remove query

const imports: string[] = []
const injections: string[] = []

Expand Down

0 comments on commit ffeccff

Please sign in to comment.