Skip to content

Commit 34bdb58

Browse files
committed
Update docs
1 parent 419f137 commit 34bdb58

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
// Include vuejs-dialog plugin
3939
<link href="./path/to/vuejs-dialog.min.css" rel="stylesheet">
4040
<script type="text/javascript" src="./path/to/vuejs-dialog.min.js"></script>
41+
<script type="text/javascript" src="./path/to/vuejs-dialog-mixin.min.js"></script> // only needed in custom components
4142

4243
<script>
4344
// Tell Vue to install the plugin.
@@ -61,6 +62,7 @@ yarn add vuejs-dialog
6162
// import into project
6263
import Vue from "vue"
6364
import VuejsDialog from "vuejs-dialog"
65+
import VuejsDialogMixin from "vuejs-dialog/vuejs-dialog-mixin.min.js" // only needed in custom components
6466

6567
// include the default style
6668
import 'vuejs-dialog/vuejs-dialog.min.css'
@@ -69,6 +71,31 @@ import 'vuejs-dialog/vuejs-dialog.min.css'
6971
Vue.use(VuejsDialog)
7072
```
7173

74+
#### Webpack External
75+
```javascript
76+
// If you're including via script tag and importing as Webpack external
77+
// Webpack config
78+
{
79+
// ... other webpack config
80+
externals: {
81+
// .. other externals if any
82+
'vuejs-dialog': 'VuejsDialog'
83+
}
84+
}
85+
```
86+
```javascript
87+
// then
88+
89+
// import into project
90+
import Vue from "vue"
91+
import VuejsDialog from "vuejs-dialog"
92+
93+
// Tell Vue to install the plugin.
94+
Vue.use(VuejsDialog.main.default)
95+
96+
// mixin available at: VuejsDialog.mixin.default
97+
```
98+
7299
## Basic Usage inside a vuejs application
73100

74101
```javascript

0 commit comments

Comments
 (0)