mirror of https://github.com/vuejs/core.git
chore: catch unhandled export as just in case
This commit is contained in:
parent
37ec04b984
commit
72b570917e
|
@ -143,6 +143,17 @@ function patchTypes(pkg) {
|
|||
spec.type === 'ExportSpecifier' &&
|
||||
shouldRemoveExport.has(spec.local.name)
|
||||
) {
|
||||
// @ts-ignore
|
||||
const exported = spec.exported.name
|
||||
if (exported !== spec.local.name) {
|
||||
// this only happens if we have something like
|
||||
// type Foo
|
||||
// export { Foo as Bar }
|
||||
// there are no such cases atm, so it is unhandled for now.
|
||||
throw new Error(
|
||||
`removed export ${exported} has different local name: ${spec.local.name}`
|
||||
)
|
||||
}
|
||||
const next = node.specifiers[i + 1]
|
||||
if (next) {
|
||||
// @ts-ignore
|
||||
|
|
Loading…
Reference in New Issue