Skip to content
This repository was archived by the owner on Sep 17, 2022. It is now read-only.

Commit 699f625

Browse files
committed
Fix build
1 parent 5f9ea33 commit 699f625

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { join, relative } from 'path'
33
import { promises as fs } from 'fs'
44
import MagicString from 'magic-string'
55

6-
import type { Plugin } from 'rollup'
6+
import type { Plugin } from 'vite'
77

88
export interface ExternalConfig {
99
baseDir: string
@@ -51,7 +51,7 @@ function getInsertInfo(source: string): InsertInfo {
5151
target = '_sfc_main'
5252
}
5353

54-
if (insertPos === -1)
54+
if (insertPos === -1 || target === null)
5555
throw new Error('Could not parse vue component')
5656

5757
return { insertPos, target }

0 commit comments

Comments
 (0)