Skip to content

Commit e39ff6f

Browse files
committed
chore: fix lint
1 parent b2fab00 commit e39ff6f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,17 @@ export const VueNamedExport: UnpluginInstance<Options | undefined, false> =
4747
`export const ${resolvedName} = `,
4848
)
4949

50-
if (!options.removeDefault) {
51-
s.appendLeft(
52-
defaultExport.end!,
53-
`\nexport default ${resolvedName};`,
54-
)
55-
} else {
50+
if (options.removeDefault) {
5651
// hack Vite HMR
5752
s.replace(
5853
/const \{ default: updated, (.*) \} = mod/,
5954
(_, $1) => `const { "${resolvedName}": updated, ${$1} } = mod`,
6055
)
56+
} else {
57+
s.appendLeft(
58+
defaultExport.end!,
59+
`\nexport default ${resolvedName};`,
60+
)
6161
}
6262

6363
return generateTransform(s, id)

0 commit comments

Comments
 (0)