We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5158bc5 commit aa7980aCopy full SHA for aa7980a
index.js
@@ -1,16 +1,17 @@
1
-import * as components from './components';
+import components from './components';
2
3
-function plugin(Vue) {
4
- if (plugin.installed) return;
5
-
6
- Object.keys(components).forEach(function(key){
7
- Vue.component(key, components[key])
8
- });
9
-}
+const VuePlugin = {
+ install(Vue){
+ if (VuePlugin.installed) return;
+ VuePlugin.installed = true;
+ for (let key in components) {
+ Vue.component(key, components[key])
+ }
10
11
+};
12
13
if (typeof window !== 'undefined' && window.Vue) {
- window.Vue.use(plugin);
14
+ window.Vue.use(VuePlugin);
15
}
16
-export * from './components';
-export default plugin;
17
+module.exports = VuePlugin;
0 commit comments