-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(build): ship built-in vue-demi to avoid resolution issues (#3680)
- Loading branch information
Showing
3 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** | ||
* vue-demi v0.14.7 | ||
* Copyright (c) 2020-present, Anthony Fu | ||
* @license MIT | ||
*/ | ||
|
||
import * as Vue from 'vue' | ||
|
||
var isVue2 = false | ||
var isVue3 = true | ||
var Vue2 = undefined | ||
|
||
function install() {} | ||
|
||
export function set(target, key, val) { | ||
if (Array.isArray(target)) { | ||
target.length = Math.max(target.length, key) | ||
target.splice(key, 1, val) | ||
return val | ||
} | ||
target[key] = val | ||
return val | ||
} | ||
|
||
export function del(target, key) { | ||
if (Array.isArray(target)) { | ||
target.splice(key, 1) | ||
return | ||
} | ||
delete target[key] | ||
} | ||
|
||
export * from 'vue' | ||
export { Vue, Vue2, isVue2, isVue3, install } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters