Remove Vue runtime dependency

This allow the bundle to be used in jsfiddle, plnkr, jsbin, etc.,
as the bundle does not depend on Vue.

The problem lies on second line of bundle

```js
"object" == typeof exports ? exports["vue-js-modal"] = factory(require("vue")) : root["vue-js-modal"] = factory(root.vue)
```

where `factory` tries to find `root.vue`, but the official Vue bundle exports
as `root.Vue`.

Removing the runtime dependency solves this.

`Object.assign` is available in all browsers but IE:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
This commit is contained in:
arve0
2017-09-13 20:24:33 +02:00
parent 48721f956d
commit e3179625d0
2 changed files with 1 additions and 10 deletions

View File

@@ -28,7 +28,6 @@
</transition>
</template>
<script>
import Vue from 'vue'
import Modal from './index'
import Resizer from './Resizer.vue'
import { inRange } from './util'
@@ -348,7 +347,7 @@
ref: this.$refs.modal
}
return Vue.util.extend(data, params || {})
return Object.assign(data, params || {})
},
/**
* Event handler which is triggered on modal resize